Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test: experiment re-creating a WinPython 2016-04 Full from a WinPythonZero #387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
5 of 6 tasks
stonebig opened this issue Sep 3, 2016 · 4 comments
Closed
5 of 6 tasks

Comments

@stonebig
Copy link
Contributor

stonebig commented Sep 3, 2016

steps:

# for Winpython3.4.4.4-64bit, takes 6 minutes to download
import os
import sys
import io
try:
    import urllib.request as urllib2  # Python 3
except:
    import urllib2  # Python 2

# for Winpython3.4.44-64bit
r_url = u"https://github.com/winpython/winpython/releases/download/1.6.20160828/packages.srcreq_cp34_amd64.zip"

r_binary = os.path.basename(r_url)
r_installer = os.environ["WINPYDIR"]+"\\..\\tools\\packages.zip"
# Download
g = urllib2.urlopen(r_url) 
with io.open(r_installer, 'wb') as f:
    f.write(g.read())
g.close
g = None
  • create a python script to unzip it
import hashlib
import zipfile as zf
r_installer = os.environ["WINPYDIR"]+"\\..\\tools\\packages.zip"
r_packages = os.environ["WINPYDIR"]+"\\..\\tools\\packages"

hashes=("7f9786125d79054113f9c795219d529f", "0b0713ebbe267941093e5cba58ba8127c2428331")

def give_hash(of_file, with_this):
    with io.open(r_installer, 'rb') as f:
        return with_this(f.read()).hexdigest()  
print (" "*12+"MD5"+" "*(32-12-3)+" "+" "*15+"SHA-1"+" "*(40-15-5)+"\n"+"-"*32+" "+"-"*40)
print ("%s %s %s" % (give_hash(r_installer, hashlib.md5) , give_hash(r_installer, hashlib.sha1),r_installer))

assert give_hash(r_installer, hashlib.md5) == hashes[0]
assert give_hash(r_installer, hashlib.sha1) == hashes[1]

# takes 2 minutes
with zf.ZipFile(r_installer) as myzip:
    myzip.extractall(path=r_packages)

  • create a python script model to install a package list.
#now install your wishes:
#last legacy ".exe" case  for PyQt5.5 on 64 bit: (need "7z.exe"  in "\tools")
#   wppm -i "%WINPYDIR%\\..\\tools\\packages\\packages.srcreq_cp34_amd64\\PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x64.exe"
# pip install spyder --no-index --find-links="%WINPYDIR%\\..\\tools\\packages.srcreq_cp34_amd64" --trusted-host=None
#or pip
pip install -r Qt5_requirements.txt --no-index --find-links="%WINPYDIR%\\..\\tools\\packages\\packages.srcreq_cp34_amd64" --trusted-host=None

if exist  "%WINPYDIR%\Lib\site-packages\IPython" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py widgetsnbextension
if exist  "%WINPYDIR%\Lib\site-packages\IPython" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix widgetsnbextension

echo =================
echo configure ipython-parallel
echo =================
@echo on
if exist  "%WINPYDIR%\Lib\site-packages\IPython"  "%WINPYDIR%\Scripts\jupyter-notebook.exe" --generate-config

rem starting Jupyter 5+, use ipcluster
if exist "%WINPYDIR%\Scripts\ipcluster.exe" "%WINPYDIR%\Scripts\ipcluster.exe" nbextension enable

rem    if not exist "ipcluster.exe" echo c.NotebookApp.server_extensions.append('ipyparallel.nbextension')>>"%winpydir%\..\settings\.jupyter\jupyter_notebook_config.py"


@echo off
echo =================
echo finish install of jupyterlab
echo =================
if exist  "%WINPYDIR%\Lib\site-packages\jupyterlab" "%WINPYDIR%\Scripts\jupyter.exe" serverextension enable --py  --sys-prefix jupyterlab

echo =================
echo finish install of bqplot
echo =================
rem before bqplot 0.6 if exist  "%WINPYDIR%\Lib\site-packages\bqplot" "%WINPYDIR%\python.exe" -m bqplot.install --user --force
if exist  "%WINPYDIR%\Lib\site-packages\bqplot" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix bqplot


echo =================
echo finish install of ipyleaflet
echo =================
if exist  "%WINPYDIR%\Lib\site-packages\ipyleaflet" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix  ipyleaflet

echo =================
echo finish install of pythreejs
echo =================
if exist  "%WINPYDIR%\Lib\site-packages\pythreejs" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py  --sys-prefix  pythreejs

echo =================
echo finish install of altair
echo =================
if exist  "%WINPYDIR%\Lib\site-packages\vega" "%WINPYDIR%\Scripts\jupyter.exe" nbextension install --py --sys-prefix vega
if exist  "%WINPYDIR%\Lib\site-packages\vega" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix vega 


echo =================
echo finish install of rise
echo =================
if exist  "%WINPYDIR%\Lib\site-packages\rise" "%WINPYDIR%\Scripts\jupyter.exe" nbextension install --py --sys-prefix rise 
if exist  "%WINPYDIR%\Lib\site-packages\rise" "%WINPYDIR%\Scripts\jupyter.exe" nbextension enable --py --sys-prefix rise 


echo =================
echo finish install seaborn iris example
echo =================
if exist  "%WINPYDIR%\Lib\site-packages\seaborn" "%WINPYDIR%\python.exe" -c "import seaborn as sns;sns.set();sns.load_dataset('iris')"

@stonebig stonebig changed the title test: experiment re-creating a WinPython Full from a WinPythonZero test: experiment re-creating a WinPython 2016-04 Full from a WinPythonZero Sep 3, 2016
@stonebig stonebig modified the milestones: 2016-05 "next wave": Matplotlib 2.0 / scikit-optimize / Pandas 0.19.1, 2016-04 "Back to school" PyQt 5.7 / IPython 5.1 / Spyder 3.0b5 Sep 4, 2016
@stonebig
Copy link
Contributor Author

stonebig commented Sep 9, 2016

a simple "pip install jupyter" over a WinPythonZero apparently works.

@stonebig stonebig modified the milestones: 2016-06 Spyder-3.1 / Pandas-0.19.1 / Matplotlib2.0., 2016-05 "refresh": Spyder 3.0 / Pandas 0.19.0 / Scikit-learn 0.18 Oct 18, 2016
@stonebig stonebig modified the milestones: 2017-02 Matplotlib-2.1 / Notebook 5.0 / Spyder-3.2, 2016-06 Spyder-3.0.2+ / WinPython-3.6.0 / TensorFlow Dec 29, 2016
@stonebig stonebig modified the milestones: 2017-03 JupyterLab-1.0beta / Spyder-4.0b2 , 2017-02 Matplotlib-2.0.2 / pandas-0.20.3 / numpy-0.13.1 / Spyder-3.2 Jul 16, 2017
@stonebig stonebig modified the milestones: 2017-03 Spyder-3.2.4 / pandas-0.21.0 / ipywidgets-7.1.0, 2018-01 Jupyterlab-1.0, end of big 32bit releases Oct 31, 2017
@stonebig
Copy link
Contributor Author

now that we know how jupyterlab works, it requires installing nodejs, a 12 Mo stone.

@stonebig
Copy link
Contributor Author

the nodejs problem will wait jupyterlab-1+

@stonebig
Copy link
Contributor Author

jupyterlab doesn't need nodejs, so let say it's "done" on principle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant