1

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.

  1. 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

  2. I tried pip3:

    sudo pip3 install selenium

    Requirement already satisfied (use --upgrade to upgrade): selenium in /usr/local/lib/python2.7/dist-packages

  3. 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

  4. 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?

1
  • Looks like your system is broken (unsurprisingly, taking into account some of things you did). Though things in the answers and in your comments will break that even more. Commented Apr 22, 2016 at 13:09

2 Answers 2

0

This is perhaps not the best solution. Having the same issue on Fedora 22, I managed to install python3 packages using pip this way:sudo pip3 install --install-option="--prefix=/usr/lib/python3.4/site-packages" package_name

Sign up to request clarification or add additional context in comments.

Comments

0

The approach you should take is to install pip for Python 3.4.

You do this in the following way:

$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python3.4 get-pip.py

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.

3 Comments

volodka@interceptor:~/Downloads$ sudo python3.4 get-pip.py Requirement already up-to-date: pip in /usr/local/lib/python3.4/dist-packages volodka@interceptor:~/Downloads$ pip install selenium Requirement already satisfied (use --upgrade to upgrade): selenium in /usr/local/lib/python2.7/dist-packages And I have no pips in /usr/bin: volodka@interceptor:~/Downloads$ whereis pip pip: /usr/local/bin/pip2.7 /usr/local/bin/pip /usr/local/bin/pip3.4 /usr/share/man/man1/pip.1.gz
try pip3.4 install selenium
I did volodka@interceptor:~/Downloads$ sudo pip3.4 install selenium Requirement already satisfied (use --upgrade to upgrade): selenium in /usr/local/lib/python2.7/dist-packages Should I move python3.4 to /usr/bin?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.