3

I have a remote machine with Python 2.6 installed. I then installed python 2.7 using these instructions python install. I then set up an alias so scripts will use 2.7 in future.

How do I install numpy to python 2.7.

7
  • 3
    pip2.7 install numpy, if you also installed pip. Otherwise using the correct alias/python when installing from source, you can do python setup.py install and it will be installed in <prefix>/lib/python2.7/site-packages. Commented Jan 20, 2015 at 17:07
  • aah you can do that...? Commented Jan 20, 2015 at 17:08
  • Python keeps track of its major versions by using lib/pythonx.y directories for packages. If you also installed python itself with make altinstall, it won't even overwrite the current default python command (can be safer for your system), and you'll only get things like python2.7 as commands. Commented Jan 20, 2015 at 17:10
  • 6
    For more control over what's installed for what, use a virtualenv, then you can specify the Python interpreter version to use and install specific tools for specific tasks. Commented Jan 20, 2015 at 17:12
  • What is the alias you used? Not a link I suppose? Because the latter could mess around with system scripts (depending on your OS); although Python 2.7 should be compatible with 2.6 scripts. Commented Jan 20, 2015 at 17:12

1 Answer 1

1
python2.7 -m pip install numpy

Should do the trick

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

Comments

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.