I have downloaded numpy and matploblib tar.gz files. Now I want to install them on RedHat 5.
I don’t have root privileges. I have read INSTALL documents but I didn’t understand how to install these.
- Can I install these libraries without root privileges?
- If yes, how do I install them? Could you give me exact commands?
- Don’t these libraries consist of python modules? So all I have to do is copy those modules to PYTHONPATH, right?
Yes, just use the
--userflag when installing the package (provided you have a recent enough version of Python)More info on the
--userflag is available in the documentation. Usually, a~/.localdirectory will be created (if necessary), your packages should be present in~/.local/lib/python$VERSION/site-packages.Install NumPy before matplotlib. To do that, just enter
in the directory where you unzipped the archive. Repeat for matplotlib.
Don’t forget to read the installation instructions for NumPy (and for matplotlib too, of course). Should you have a problem, it’ll likely be covered in the documentation.
$PYTHONPATHwith a link to~/.local/lib/python$VERSION/site-packagesIf you have an old version of Python that doesn’t recognize the
--userflag, you should still be able to give the path of the installation with the--prefixflag. You could use--prefix=~/.localin order to match what would have happened if you had a more recent version of Python(Note that this topic is covered in the NumPy installation guide…).