I have Python3 and Python2 and also
pip3 for various python version package installation.
I want install a ZMQ library in Python 2 and 3, I did it in python2 as well with the following line:
sudo pip install zmq
But when I using
pip3 for ZMQ installation on Python3 I have a problem:
$ pip3 install zmq Collecting zmq Collecting pyzmq (from zmq) Using cached https://files.pythonhosted.org/packages/94/e8/6b39ec62b4f7821eeefd69e0c1ddfd56744cd6613f8216fc972cfc8d7765/pyzmq-17.1.0-cp36-cp36m-manylinux1_x86_64.whl Installing collected packages: pyzmq, zmq Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/zmq' Consider using the `--user` option or check the permissions.
Then when I used sudo before
$ sudo pip3 install zmq sudo: pip3: command not found
$ pip --version pip 18.0 from /home/benyamin/.local/lib/python3.6/site-packages/pip (python 3.6) $ pip3 --version pip 18.0 from /home/benyamin/.local/lib/python3.6/site-packages/pip (python 3.6) $ which pip /home/benyamin/.local/bin/pip $ which pip3 /home/benyamin/.local/bin/pip3 $ sudo which pip /usr/local/bin/pip $ sudo which pip3 $ # no output
It seems that my
pip is for Python3.6!
Any help would be greatly appreciated.