I am a Python 3 user. Every now and then there is a customer that requests using Python2 code or Ipython (Jupyter) Notebook in Python 2. For this reason, I tried to use Docker to make a container for Anaconda 2 on my Windows laptop.
Here is how to do it step by step:
Go to Docker’s website and install Docker for Windows, if you don’t have it.
Run the following commands:
docker pull continuumio/anaconda
docker run -i -t continuumio/anaconda /bin/bash
or you can run the following command to be able to open a Jupyter notebook.
docker run -i -t -p 8888:8888 continuumio/anaconda /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser"
Find your Docker IP address:
docker-machine ip dev
Open your Jupyter Notebook in your favorite browser:
In your address bar type:
This should work by default unless your IP is different (Look at step 3)