1

I have installed the numpy module for Python 2.7. However I have three versions (2.4, 2.6 and 2.7) on my system and it has installed on 2.7 only. I presume this is the default python as this is the version the command "which python" gives me in terminal. I am running a python script in another program that defaults to python 2.4. I have two questions:

  1. How do I install numpy on the non default version of Python, in my case python2.4. I have consulted the forums and could not find an answer.

  2. Can I force another program to run a specfic version of Python when running a python script. From sys.version I can see which python its running, however is there another command I can use to enforce a specific version to run.

Thanks


Thanks Don.Joey,

Yes, I have looked at virtual environments and it is the correct way to do this. I understand it will work in the terminal, however will this work when another program is calling the Python script?

Cheers

0

What you are looking for are virtual environments. They allow you to have different version of a package. They also make it possible to have several versions of python live together.

Make a virtual environment that uses 2.4. Install numpy in it. Run your script in that venv (virtual environment). Enjoy.

  • Karel, feel free to edit my answer or write your own. I have given the most important pointer. I am not going to solve each and every detail. Thanks for your feedback, though. – don.joey Apr 14 '15 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.