# 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

"""
Explanation: PY36 geobase
End of explanation
"""


# 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

"""
Explanation: PY27 presentation base
End of explanation
"""


# Specific environment set-up for etl-lrs-dms

This folder contains a selection of date stamped requirements files. 



# remove environment

!conda remove -n geo-base --all


# Create environment

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

# list python environments

!conda env list #list environments

"""
Explanation: 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.
End of explanation
"""


