I have installed Anaconda3 to get all the modules for python 3. However there are some codes which must be run in python 2. I don't have any installed python 2 module. I tried installing numpy via:
pip2.7 install numpy
But got an error:
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/numpy'
Whenever I want to install a module I get the same error, for instance, with the NLTK module I get
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/nltk-3.2.1.dist-info'
How can I fix this?
Thanks!
virtualenv. It will help you if you have multiple versions of python installed on the same machine.