The package I wanted to use for analysis was written in python2.x (stop it). I don't want to hurt my local python3 environment. But I don't want to use a VM either!
That's right, let's try Docker and so on. Let's go around for the time being.
Can you easily build an image with Docker pull? Well, in 2018 I stopped handling python2 in jupyter / scipy-notebook (Docker Image Library). Damn, then someone has come up with a solution in the forum, eh, (at the end of the long scroll) it's impossible after all! I'll find it myself when this happens
People who want to handle .jpnb written in python2 with Docker (very niche). Mac user. I'm a Docker beginner so I can't explain it in detail, but I hope this article helps.
All you have to do You can execute the following in order on the terminal.
1 Move to the directory you want to mount with cd. (Through necessary) 2 Pull miniconda (jupyter / scipy-notebook rejected for the above reason)
$ docker pull continuumio/miniconda
3 docker run: Here, set the name to'mini', port to local: 8001 cotainer: 8000, and specify the mount destination under / home.
$ docker run -it --name mini -p 8001:8000 -v ${PWD}:/home continuumio/miniconda bash
4 Execute without thinking about the following. (I have to put backports.functools_lru_cache by myself.)
conda create -n py27 python=2.7
conda activate py27
conda install notebook ipykernel
pip install backports.functools_lru_cache
ipython kernel install --user
5 If necessary, install the necessary modules with conda install / pip install as appropriate.
6 Local http: // localhost: 8001 Expand notebook to
jupyter notebook --port 8000 --ip=0.0.0.0 --allow-root
7 Enjoy coding
It's annoying, but at the very least, I can do the title. Please let me know if there is another good way. ..