I console access to a computer where I do not have root nor sudo rights.
Python version is 2.5.2 and numpy is not available. I cannot use python setup.py install --u
If you can resolve all the dependencies, you might be able to install it in your $HOME using dpkg
. dpkg
doesn't resolve dependencies automatically, so you might have to figure out the right order to install the packages in. Download the .deb files that you're interested in and run the following command for each package:
$ dpkg -i --force-not-root --root=$HOME mypackagename.deb
If you then add the directory with the newly installed Numpy to your $PYTHONPATH, or to sys.path, Numpy might just work.
Alternatively, you might be able to extract the files you need from one of the other binary distributions of Numpy around (such as Sage).
Numpy is quite fussy about what versions of its dependencies it requires though, so you're probably best off downloading the packages for the specific version of Linux that you're using.
Finally, consider asking your administrator whether s/he'll install Numpy for you. You'd be surprised how often a simple request can solve all your problems, especially since it's just one apt-get command.
EDIT: Just as an alternative, if you can get access to another machine running the same version/architecture of Ubuntu/Debian, you might be able to download the numpy source tarball, compile with python setup.py build
and then just copy everything in directory_where_you_extracted_the_tarball/build/numpy/lib.OS-arch-PythonVersion
(on my system, it is lib.linux-x86_64-2.6/
) to a directory of your choice on the target machine. Then, just add that directory to your $PYTHONPATH and you're done. Remember to copy the contents, not the whole directory (tar -jcf np.tar.bz2 /path/to/numpy/build/numpy/lib.OS-arch-PythonVersion/numpy
then get the tar.bz2 to the remote machine and extract it in a directory of your choice).
There is some documentation on how to use setuptools here: http://docs.python.org/install/index.html#how-installation-works
Building Numpy by hand is not for the faint of heart though, so this might lead to a lot of head-banging and hair-tearing.