Ask: I can't install or upgrade any lib for python 3.4 because pip, pip3, pip3.4 not working or connected to python2.7.
I tried to set alias python=python3 and use just pip:
sudo pip install selenium
Requirement already satisfied (use --upgrade to upgrade): selenium in /usr/local/lib/python2.7/dist-packages
I tried pip3:
sudo pip3 install selenium
Requirement already satisfied (use --upgrade to upgrade): selenium in /usr/local/lib/python2.7/dist-packages
I tried pip3.4:
sudo pip3.4 install selenium
Requirement already satisfied (use --upgrade to upgrade): selenium in /usr/local/lib/python2.7/dist-packages
I tried to create venv for python3.4:
volodka@interceptor:/usr/bin$ sudo virtualenv -p /usr/bin/python3.4 python3env Running virtualenv with interpreter /usr/bin/python3.4 Using base prefix '/usr' New python executable in python3env/bin/python3.4 Also creating executable in python3env/bin/python Installing setuptools, pip, wheel...done.
volodka@interceptor:/usr/bin/python3env/bin$ . activate
(python3env)volodka@interceptor:/usr/bin/python3env/bin$ sudo pip install selenium Requirement already satisfied (use --upgrade to upgrade): selenium in /usr/local/lib/python2.7/dist-packages
Pip3, pip3.4 in virtualenv also try to install lib for python2.7. What I'm doing wrong?
The approach you should take is to install pip for
Python 3.4
.You do this in the following way:
You then install things for Python 3.4 with pip3.4, and you install things with Python 2-7 with pip-2.7.
Check
/usr/bin
to see which pip versions you have there.