I’m using a server where I don’t have administrative rights and I need to use the latest version of numpy. The system administrator insists that he cannot update the global numpy to the latest version, so I have to install it locally.
I can do that without trouble, but how do I make sure that “import numpy” results in the newer local install to be imported, as opposed to the older global version? I can adjust my PYTHONPATH, but I will want to use some of the global imports as well so I can’t exclude all the global packages.
I’m on CentOS 6, by the way.
Thanks!
Python searches the path in order, so simply put the directory where you installed your NumPy first in the path.
You can check
numpy.version.versionto make sure you’re getting the version you want.