Skip to content

Commit

Permalink
Updated installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedamen committed May 28, 2020
1 parent 5336f53 commit 51a061c
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 102 deletions.
2 changes: 1 addition & 1 deletion pythoncourse/installation/create_conda_env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ call conda activate py36class
REM Install Tensorflow, PyTorch and Anaconda (lots of pacakged)
REM Pandas 0.24.2 is needed for some packages and scikit-learn 0.20.2
REM only if you have GPU below 2 lines instead of CPU versions
REM conda install tensorflow-gpu=2.1.0 anaconda pandas=0.24.2 scikit-learn=0.20.2 --yes
REM conda install anaconda tensorflow-gpu=2.1.0 anaconda pandas=0.24.2 scikit-learn=0.20.2 --yes
REM conda install pytorch torchvision cudatoolkit=10.1 -c pytorch --yes
call conda install anaconda tensorflow=2.1.0 anaconda pandas=0.24.2 scikit-learn=0.20.2 --yes
call conda install pytorch torchvision cpuonly -c pytorch --yes
Expand Down
2 changes: 1 addition & 1 deletion pythoncourse/installation/create_conda_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ source activate py36class
# Install Tensorflow, PyTorch and Anaconda (lots of pacakged)
# Pandas 0.24.2 is needed for some packages and scikit-learn 0.20.2
# only if you have GPU below 2 lines instead of CPU versions
# conda install tensorflow-gpu=2.1.0 anaconda pandas=0.24.2 scikit-learn=0.20.2 --yes
# conda install anaconda tensorflow-gpu=2.1.0 anaconda pandas=0.24.2 scikit-learn=0.20.2 --yes
# conda install pytorch torchvision cudatoolkit=10.1 -c pytorch --yes
conda install anaconda tensorflow=2.1.0 anaconda pandas=0.24.2 scikit-learn=0.20.2 --yes
conda install pytorch torchvision cpuonly -c pytorch --yes
Expand Down
105 changes: 55 additions & 50 deletions pythoncourse/installation/installing_anaconda_and_pycharm.html
Original file line number Diff line number Diff line change
Expand Up @@ -13183,7 +13183,7 @@ <h2 id="Installing-tabula-py-and-pytesseract">Installing tabula-py and pytessera
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Installing-a-conda-environment-for-Windows-from-YML-file-(quickest-method---recommended)">Installing a conda environment for Windows from YML file (quickest method - recommended)<a class="anchor-link" href="#Installing-a-conda-environment-for-Windows-from-YML-file-(quickest-method---recommended)">&#182;</a></h2><p>We can download <a href="https://raw.githubusercontent.com/cuemacro/teaching/master/pythoncourse/installation/environment_windows.yml">environment_windows.yml (click to download)</a> and use that to create our conda environment with all the necessary packages. This also installs the exact same libraries versions that I have.</p>
<h2 id="Installing-a-conda-environment-for-Windows-from-YML-file-(quickest-method---recommended)">Installing a conda environment for Windows from YML file (quickest method - recommended)<a class="anchor-link" href="#Installing-a-conda-environment-for-Windows-from-YML-file-(quickest-method---recommended)">&#182;</a></h2><p>We can download <a href="https://raw.githubusercontent.com/cuemacro/teaching/master/pythoncourse/installation/environment_windows.yml">environment_windows.yml (click to download)</a> and use that to create our conda environment with all the necessary packages. This also installs the exact same libraries versions that I have (and reduces the likelihood of version conflicts between libraries).</p>
<ul>
<li>Open up the Anaconda Prompt (should be in the Start Menu)</li>
<li><p>In this prompt, your Anaconda folder will be on the path (ie. it will recognise where <code>conda</code> is installed etc.)</p>
Expand Down Expand Up @@ -13244,28 +13244,31 @@ <h3 id="Copy-the-below-to-create_conda_env.bat-for-Windows-(or-download-it-from-

REM Remove any existing environment called py36class, and create a py36class with anaconda packages
call conda remove -n py36class --all --yes
call conda create -n py36class python=3.6 anaconda
call conda create -n py36class python=3.6
call conda activate py36class

REM Install scikit-learn (downgrade for some later dependencies) - xlwings for Windows
call conda install anaconda scikit-learn=0.20.2 --yes
call conda install -c conda-forge xlwings=0.19.4 --yes

REM Install PyTorch &amp; Tensorflow
REM Install Tensorflow, PyTorch and Anaconda (lots of pacakged)
REM Pandas 0.24.2 is needed for some packages and scikit-learn 0.20.2
REM only if you have GPU below 2 lines instead of CPU versions
REM call conda install tensorflow-gpu=2.1.0
REM call conda install pytorch torchvision cudatoolkit=10.1 -c pytorch --yes
call conda install anaconda tensorflow=2.1.0 --yes
REM conda install anaconda tensorflow-gpu=2.1.0 anaconda pandas=0.24.2 scikit-learn=0.20.2 --yes
REM conda install pytorch torchvision cudatoolkit=10.1 -c pytorch --yes
call conda install anaconda tensorflow=2.1.0 anaconda pandas=0.24.2 scikit-learn=0.20.2 --yes
call conda install pytorch torchvision cpuonly -c pytorch --yes

REM OpenCV and PyArrow need to be installed earlier
call conda install -c conda-forge pyarrow=0.17.1 opencv --yes

REM xlwings only works for Mac or Windows
call conda install -c conda-forge xlwings=0.19.4 --yes

REM Install from conda-forge (pyarrow is a newer version!)
call conda install -c conda-forge ^
jupyter_contrib_nbextensions jupyter_nbextensions_configurator ^
redis-py python-blosc pathos graphviz python-graphviz textblob ^
vaex-core vaex-viz vaex-jupyter vaex-arrow vaex-server vaex-hdf5 vaex-astro vaex-distributed ^
pyspark=2.4.0 koalas ^
spacy fastparquet python-snappy nodejs pystan fbprophet setuptools-git ^
vispy datashader pyproj holoviews streamz quandl bqplot opencv s3fs blpapi ^
vispy datashader pyproj holoviews streamz quandl bqplot blpapi ^
--yes

REM Install database
Expand All @@ -13274,35 +13277,32 @@ <h3 id="Copy-the-below-to-create_conda_env.bat-for-Windows-(or-download-it-from-
REM Install transformers/huggingface and table libraries
REM Install graphics/plotting libraries
REM Install findatapy, chartpy and findatapy
REM opencv-contrib-python==4.2.0.34 \
call pip install arctic==1.79.2 ^
celery==4.4.0 celery[redis] celery[msgpack] msgpack-python ^
fxcmpy alpha_vantage yfinance twython newspaper3k seasonal pdfminer.six vaderSentiment gensim wordcloud rise requests_html ^
fxcmpy alpha_vantage yfinance twython newspaper3k seasonal pdfminer.six vaderSentiment gensim wordcloud RISE requests_html ^
textacy==0.8.0 ^
transformers pytesseract cmdstanpy==0.4 tabula-py==1.4.3 ^
cvlib ^
cufflinks==0.17.3 plotly==4.8.0 ^
dash==1.12.0 dash-html-components==1.0.3 dash-core-components==1.10.0 dash-table==4.7.0 jupyter-dash==0.2.1 dtale==1.8.1 progressbar2==3.38.0 ^
dash==1.12.0 dash-html-components==1.0.3 dash-core-components==1.10.0 dash-table==4.7.0 jupyter-dash==0.2.1 ^
dtale==1.8.1 progressbar2==3.38.0 ^
finmarketpy chartpy findatapy

REM To be able to plot Plotly into PNG or JPG
call conda install -c plotly plotly-orca --yes

REM In case has been installed elsewhere by pip
call pip uninstall pandas

REM Newer versions of Pandas aren't supported as well by other libraries eg. Arctic so stick to 0.24.2
call conda install -c anaconda pandas=0.24.2 --yes
call conda install -c conda-forge pyarrow=0.17.1 --yes

REM Jupyter libraries
call jupyter contrib nbextension install --user
call jupyter nbextension enable execute_time/ExecuteTime
call jupyter-nbextension install rise --py --sys-prefix
call jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
call jupyter labextension install plotlywidget --no-build
call jupyter labextension install jupyterlab-plotly --no-build
call jupyter labextension install bqplot
call jupyter lab build</code></pre>

REM some of these extensions are not compatible with latest Jupyterlab
REM call jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
REM call jupyter labextension install plotlywidget --no-build
REM call jupyter labextension install jupyterlab-plotly --no-build
REM call jupyter labextension install bqplot --no-build
REM call jupyter lab build</code></pre>

</div>
</div>
Expand All @@ -13321,7 +13321,7 @@ <h2 id="Installing-xlwings-addin-in-Excel-on-Windows-(or-Mac)">Installing xlwing
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Installing-a-conda-environment-for-Linux-or-Mac-from-YAML-file-(quickest-method---recommended)">Installing a conda environment for Linux or Mac from YAML file (quickest method - recommended)<a class="anchor-link" href="#Installing-a-conda-environment-for-Linux-or-Mac-from-YAML-file-(quickest-method---recommended)">&#182;</a></h2><p>We can download <a href="https://raw.githubusercontent.com/cuemacro/teaching/master/pythoncourse/installation/environment_linux.yml">environment_linux.yml (click to download)</a> and use that to create our conda environment with all the necessary packages. This should be a lot faster to run. This also installs the exact same libraries versions that I have.</p>
<h2 id="Installing-a-conda-environment-for-Linux-or-Mac-from-YAML-file-(quickest-method---recommended)">Installing a conda environment for Linux or Mac from YAML file (quickest method - recommended)<a class="anchor-link" href="#Installing-a-conda-environment-for-Linux-or-Mac-from-YAML-file-(quickest-method---recommended)">&#182;</a></h2><p>We can download <a href="https://raw.githubusercontent.com/cuemacro/teaching/master/pythoncourse/installation/environment_linux.yml">environment_linux.yml (click to download)</a> and use that to create our conda environment with all the necessary packages. This should be a lot faster to run. This also installs the exact same libraries versions that I have (and reduces the likelihood of version conflicts between libraries).</p>
<ul>
<li>Open up a terminal window (making sure that Anaconda is on your path)</li>
<li><p>In this prompt, your Anaconda folder will be on the path (ie. it will recognise where <code>conda</code> is installed etc.)</p>
Expand Down Expand Up @@ -13405,28 +13405,31 @@ <h3 id="Copy-the-below-to-create_conda_env.sh-(or-download-it-from-GitHub)">Copy

# Remove any existing environment called py36class, and create a py36class with anaconda packages
conda remove -n py36class --all --yes
conda create -n py36class python=3.6 anaconda
conda create -n py36class python=3.6
source activate py36class

# Install scikit-learn (downgrade for some later dependencies) - xlwings only works for Mac (won't install on Linux)
conda install anaconda scikit-learn=0.20.2 --yes
conda install conda-forge xlwings=0.19.4 --yes

# Install PyTorch &amp; Tensorflow
# Install Tensorflow, PyTorch and Anaconda (lots of pacakged)
# Pandas 0.24.2 is needed for some packages and scikit-learn 0.20.2
# only if you have GPU below 2 lines instead of CPU versions
# conda install tensorflow-gpu=2.1.0
# conda install anaconda tensorflow-gpu=2.1.0 anaconda pandas=0.24.2 scikit-learn=0.20.2 --yes
# conda install pytorch torchvision cudatoolkit=10.1 -c pytorch --yes
conda install anaconda tensorflow=2.1.0 --yes
conda install anaconda tensorflow=2.1.0 anaconda pandas=0.24.2 scikit-learn=0.20.2 --yes
conda install pytorch torchvision cpuonly -c pytorch --yes

# OpenCV and PyArrow need to be installed earlier
conda install -c conda-forge pyarrow=0.17.1 opencv --yes

# xlwings only works for Mac
conda install -c conda-forge xlwings=0.19.4 --yes

# Install from conda-forge (pyarrow is a newer version!)
conda install -c conda-forge \
jupyter_contrib_nbextensions jupyter_nbextensions_configurator \
redis-py python-blosc pathos graphviz python-graphviz textblob \
vaex-core vaex-viz vaex-jupyter vaex-arrow vaex-server vaex-hdf5 vaex-astro vaex-distributed \
pyspark=2.4.0 koalas \
spacy fastparquet python-snappy nodejs pystan fbprophet setuptools-git \
vispy datashader pyproj holoviews streamz quandl bqplot opencv s3fs \
pyspark=2.4.0 koalas \
vispy datashader pyproj holoviews streamz quandl bqplot \
--yes

# Install database
Expand All @@ -13436,26 +13439,26 @@ <h3 id="Copy-the-below-to-create_conda_env.sh-(or-download-it-from-GitHub)">Copy
# Install graphics/plotting libraries
# Install findatapy, chartpy and findatapy
# Install modin (later versions need later versions of pandas, may downgrade to pandas to 0.24.2
# opencv-contrib-python==4.2.0.34 \
pip install arctic==1.79.2 \
celery==4.4.0 celery[redis] celery[msgpack] msgpack-python \
fxcmpy alpha_vantage yfinance twython newspaper3k seasonal pdfminer.six vaderSentiment gensim wordcloud rise requests_html \
fxcmpy alpha_vantage yfinance twython newspaper3k seasonal pdfminer.six vaderSentiment gensim wordcloud RISE requests_html \
textacy==0.8.0 \
transformers pytesseract cmdstanpy==0.4 tabula-py==1.4.3 \
cvlib \
cufflinks==0.17.3 plotly==4.8.0 \
dash==1.12.0 dash-html-components==1.0.3 dash-core-components==1.10.0 dash-table==4.7.0 jupyter-dash==0.2.1 dtale==1.8.1 progressbar2==3.38.0 \
finmarketpy chartpy findatapy \
modin==0.5.4
dash==1.12.0 dash-html-components==1.0.3 dash-core-components==1.10.0 dash-table==4.7.0 jupyter-dash==0.2.1 \
dtale==1.8.1 progressbar2==3.38.0 \
finmarketpy chartpy findatapy

# To be able to plot Plotly into PNG or JPG
conda install -c plotly plotly-orca --yes

# In case has been installed elsewhere by pip
pip uninstall pandas
# Note that modin may not be compatible with other libraries, so it is recommended
# you install it in its own environment if you do want to use it
# pip install modin==0.5.4

# Newer versions of Pandas aren't supported as well by other libraries (eg. Arctic), so stick to 0.24.2
conda install -c anaconda pandas=0.24.2 --yes
conda install -c conda-forge pyarrow=0.17.1 --yes
# conda install -c conda-forge pyarrow=0.17.1 --yes

# GPU libraries for working with DataFrames
# conda install -c rapidsai -c nvidia -c conda-forge -c defaults rapids=0.10 python=3.6
Expand All @@ -13464,11 +13467,13 @@ <h3 id="Copy-the-below-to-create_conda_env.sh-(or-download-it-from-GitHub)">Copy
jupyter contrib nbextension install --user # to activate js on Jupyter
jupyter nbextension enable execute_time/ExecuteTime
jupyter-nbextension install rise --py --sys-prefix
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
jupyter labextension install plotlywidget --no-build
jupyter labextension install jupyterlab-plotly --no-build
jupyter labextension install bqplot
jupyter lab build</code></pre>

# Some of these extensions are not compatible with latest Jupyterlab
# jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
# jupyter labextension install plotlywidget --no-build
# jupyter labextension install jupyterlab-plotly --no-build
# jupyter labextension install bqplot
# jupyter lab build</code></pre>

</div>
</div>
Expand Down
Loading

0 comments on commit 51a061c

Please sign in to comment.