PY36 geobase


In [1]:
# From scratch

# conda install -n geo-base [package]

# remove old virtual env

conda remove -n geo-base --all

# create new virtual env

conda create -n geo-base python=3.6

# activate virtual env

source activate geo-base

# install other packages

conda install -c conda-forge numpy jupyter pandas-profiling docker-py geopandas mplleaflet tabulate folium nbtutor jupyter_contrib_nbextensions rise seaborn nbdime geoplot nbconvert

conda install -c conda-forge numpy jupyter

conda install -c conda-forge pandas-profiling docker-py

conda install -c conda-forge geopandas

conda install -c conda-forge mplleaflet tabulate folium

conda install -c conda-forge nbtutor

conda install -c conda-forge jupyter_contrib_nbextensions

conda install -c conda-forge rise

conda install -c conda-forge seaborn

conda install -c conda-forge nbdime 

conda install -c conda-forge geoplot

conda install -c conda-forge nbconvert

pip install OSGridConverter

pip install convertbng


  File "<ipython-input-1-8bb8763d5496>", line 7
    conda remove -n etl-lrs-dms --all
               ^
SyntaxError: invalid syntax

PY27 presentation base


In [ ]:
# From scratch

# conda install -n py-27-prez [package]

# remove old virtual env

conda remove -n py-27-prez --all

# create new virtual env

conda create -n py-27-prez python=2.7

# activate virtual env

source activate py-27-prez

# install other packages

conda install -c conda-forge jupyter tabulate nbtutor jupyter_contrib_nbextensions rise nbdime nbconvert

Make sure nbdime is also installed in the main conda install. This is used for git diffs.

Also (in main) run -

nbdime config-git --enable --global

Background - creating a spec list file for easy(ish) installation

Activate the environment whose libraries you want to copy:

source activate geo-base

To create this spec list as a file in the current working directory, run:

conda list --explicit > geo-base_libs.txt

An explicit spec file is not usually cross platform, and therefore has a comment at the top such as # platform: osx-64 showing the platform where it was created. This platform is the one where this spec file is known to work. On other platforms, the packages specified might not be available or dependencies might be missing for some of the key packages already in the spec.

To use the spec file to create an identical environment on the same machine or another machine:

conda create --name geo-base --file geo-base_libs.txt

To use the spec file to install its listed packages into an existing environment:

conda install --name geo-base --file geo-base_libs.txt

Conda does not check architecture or dependencies when installing from a spec file. To ensure that the packages work correctly, make sure that the file was created from a working environment, and use it on the same architecture, operating system and platform, such as linux-64 or osx-64.

To create this spec list as a file in the current working directory, run:

conda list --explicit > geo-base_libs.txt

An explicit spec file is not usually cross platform, and therefore has a comment at the top such as # platform: osx-64 showing the platform where it was created. This platform is the one where this spec file is known to work. On other platforms, the packages specified might not be available or dependencies might be missing for some of the key packages already in the spec.


In [ ]:
# Specific environment set-up for etl-lrs-dms

This folder contains a selection of date stamped requirements files.

In [9]:
# remove environment

!conda remove -n geo-base --all

In [ ]:
# Create environment

!conda create --name geo-base--file 20180206_requirements.txt


Preparing transaction: done
Verifying transaction: done
Executing transaction: - Installing /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/lib/python3.5/site-packages/vega/static -> jupyter-vega
Making directory: /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/share/jupyter/nbextensions/jupyter-vega/
Copying: /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/lib/python3.5/site-packages/vega/static/index.js.map -> /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/share/jupyter/nbextensions/jupyter-vega/index.js.map
Copying: /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/lib/python3.5/site-packages/vega/static/vega.js -> /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/share/jupyter/nbextensions/jupyter-vega/vega.js
Copying: /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/lib/python3.5/site-packages/vega/static/vega-lite.html -> /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/share/jupyter/nbextensions/jupyter-vega/vega-lite.html
Copying: /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/lib/python3.5/site-packages/vega/static/index.js -> /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/share/jupyter/nbextensions/jupyter-vega/index.js
Copying: /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/lib/python3.5/site-packages/vega/static/vega.html -> /home/beckant/LocalInstalls/anaconda3/envs/etl-lrm-dms/share/jupyter/nbextensions/jupyter-vega/vega.html
- Validating: OK

    To initialize this nbextension in the browser every time the notebook (or other app) loads:
    
          jupyter nbextension enable vega --py --sys-prefix
    

- 

In [2]:
# list python environments

!conda env list #list environments


# conda environments:
#
base                     /home/beckant/LocalInstalls/anaconda3
etl-lrs-dms           *  /home/beckant/LocalInstalls/anaconda3/envs/etl-lrs-dms


In [ ]: