diff --git a/all-spark-notebook/README.md b/all-spark-notebook/README.md index 1e7580ae..f2d3f692 100644 --- a/all-spark-notebook/README.md +++ b/all-spark-notebook/README.md @@ -241,8 +241,17 @@ You can return to the default environment with this command: source deactivate ``` -The commands `ipython`, `python`, `pip`, `easy_install`, and `conda` (among others) are available in both environments. +The commands `jupyter`, `ipython`, `python`, `pip`, `easy_install`, and `conda` (among others) are available in both environments. For convenience, you can install packages into either environment regardless of what environment is currently active using commands like the following: +``` +# install a package into the python2 environment +pip2 install some-package +conda install -n python2 some-package + +# install a package into the default (python 3.x) environment +pip3 install some-package +conda install -n python3 some-package +``` ## JupyterHub diff --git a/datascience-notebook/README.md b/datascience-notebook/README.md index 3971bcf6..54f1d317 100644 --- a/datascience-notebook/README.md +++ b/datascience-notebook/README.md @@ -70,7 +70,17 @@ You can return to the default environment with this command: source deactivate ``` -The commands `ipython`, `python`, `pip`, `easy_install`, and `conda` (among others) are available in both environments. +The commands `jupyter`, `ipython`, `python`, `pip`, `easy_install`, and `conda` (among others) are available in both environments. For convenience, you can install packages into either environment regardless of what environment is currently active using commands like the following: + +``` +# install a package into the python2 environment +pip2 install some-package +conda install -n python2 some-package + +# install a package into the default (python 3.x) environment +pip3 install some-package +conda install -n python3 some-package +``` ## JupyterHub diff --git a/pyspark-notebook/Dockerfile b/pyspark-notebook/Dockerfile index f050a8ce..9b8f65d3 100644 --- a/pyspark-notebook/Dockerfile +++ b/pyspark-notebook/Dockerfile @@ -69,6 +69,9 @@ RUN conda create --quiet --yes -p $CONDA_DIR/envs/python2 python=2.7 \ 'scikit-learn=0.17*' \ pyzmq \ && conda clean -tipsy +# Add shortcuts to distinguish pip for python2 and python3 envs +RUN ln -s $CONDA_DIR/envs/python2/bin/pip $CONDA_DIR/bin/pip2 && \ + ln -s $CONDA_DIR/bin/pip $CONDA_DIR/bin/pip3 # Install Python 2 kernel spec into the Python 3 conda environment which # runs the notebook server diff --git a/pyspark-notebook/README.md b/pyspark-notebook/README.md index fc81910e..e26b944e 100644 --- a/pyspark-notebook/README.md +++ b/pyspark-notebook/README.md @@ -143,8 +143,17 @@ You can return to the default environment with this command: source deactivate ``` -The commands `ipython`, `python`, `pip`, `easy_install`, and `conda` (among others) are available in both environments. +The commands `jupyter`, `ipython`, `python`, `pip`, `easy_install`, and `conda` (among others) are available in both environments. For convenience, you can install packages into either environment regardless of what environment is currently active using commands like the following: +``` +# install a package into the python2 environment +pip2 install some-package +conda install -n python2 some-package + +# install a package into the default (python 3.x) environment +pip3 install some-package +conda install -n python3 some-package +``` ## JupyterHub diff --git a/scipy-notebook/Dockerfile b/scipy-notebook/Dockerfile index f1434029..f8be0803 100644 --- a/scipy-notebook/Dockerfile +++ b/scipy-notebook/Dockerfile @@ -59,6 +59,9 @@ RUN conda create --quiet --yes -p $CONDA_DIR/envs/python2 python=2.7 \ 'h5py=2.5*' \ 'pyzmq' \ && conda clean -tipsy +# Add shortcuts to distinguish pip for python2 and python3 envs +RUN ln -s $CONDA_DIR/envs/python2/bin/pip $CONDA_DIR/bin/pip2 && \ + ln -s $CONDA_DIR/bin/pip $CONDA_DIR/bin/pip3 USER root diff --git a/scipy-notebook/README.md b/scipy-notebook/README.md index 46606044..0febef17 100644 --- a/scipy-notebook/README.md +++ b/scipy-notebook/README.md @@ -67,8 +67,17 @@ You can return to the default environment with this command: source deactivate ``` -The commands `ipython`, `python`, `pip`, `easy_install`, and `conda` (among others) are available in both environments. +The commands `jupyter`, `ipython`, `python`, `pip`, `easy_install`, and `conda` (among others) are available in both environments. For convenience, you can install packages into either environment regardless of what environment is currently active using commands like the following: +``` +# install a package into the python2 environment +pip2 install some-package +conda install -n python2 some-package + +# install a package into the default (python 3.x) environment +pip3 install some-package +conda install -n python3 some-package +``` ## JupyterHub