I’m an ubuntu 16.4 user and I installed anaconda3 and using both python2 and python3 kernels.
>>>jupyter kernelspec list
Available kernels:
python2 /home/peterkim/.local/share/jupyter/kernels/python2
python3 /home/peterkim/anaconda3/share/jupyter/kernels/python3
and.. the problem was that I don’t know where/how to install packages in order to for my python2 jupyter notebook not to make error ‘no module named …’.
I tried pip install matplotlib
and conda install matplotlib
and I also appended ‘/home//anaconda2/pkgs’ to the sys.path
.
(I also installed anaconda2 in search of the way of using parallel kernels. After I realised that anaconda2 was not needed. but I didn’t uninstall it.)
thank you for helping me in advance..!
Kenil Vasani
I’d recommend reading through here:
https://conda.io/docs/py2or3.html
I had the same problem after installing a Python 2.7 environment inside my Anaconda3 installation. I’m not sure which command I used to create the environment, but it actually didn’t install all the optional packages that are usually bundled with Anaconda (like matplotlib, numpy, …). But that’s not a big issue, you can easily install additional packages with pip as follows:
First, list your conda environments:
Next, activate your python 2 environment using
source activate <env>
(Linux/OSX) oractivate <env>
(Windows):Finally, use pip to install the required packages:
Hope that this helps.