0

I have both Python 3.5 and Python 3.6 on my laptop. I am using Ubuntu 16.04. I used pip3 to install numpy. It is working with Python3.5 but not with Python3.6. Please help.

1
  • 1
    Using conda distribution and environments might make your life easier when you want to have multiple python versions installed. Commented Feb 17, 2018 at 10:42

3 Answers 3

1

To install via pip for specific python version use:

    py -(python-version) -m pip install numpy

in your case

   py -3.6 -m pip install numpy
Sign up to request clarification or add additional context in comments.

Comments

0

Make sure that your Python is Python 3.6:

python --version
Python 3.6.4

Now install with:

python -m pip install numpy

This will run the pip for the current Python the option -m imports the module pip and runs it as it would be pip as command line app.

Comments

0

Cannot comment since I don't the rep.

If your default python is 3.5 when you check python --version, the way to go would be to find the location of the python executable for the desired version (here 3.6). cd to that folder and then run the command given by Mike.

2 Comments

so you have to locate the binary first.
Sorry I am new to Linux. I did not understand this "so you have to locate the binary first"

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.