[Numpy-discussion] Numpy compilation error
Thu Apr 29 22:04:51 CDT 2010
On Fri, Apr 30, 2010 at 5:23 AM, Pradeep Jha <email@example.com> wrote:
> I have a few questions:
> I downloaded numpy1.3.0 and installed it in a directory using the command
> python setup.py install --prefix=$HOME/src/numpy
> and I see that numpy files have been generated in that directory.
> Now when I tried to install matplotlib, it complained that my numpy version
> is 1.0.3
That's because by default, python does not look into
$HOME/src/numpy/.... You have several ways of controlling that, but
the easy one is PYTHONPATH. This environment variable should contain
your site-package, which is the $prefix/lib/python2.4/site-packages
here where $prefix is what you gave to --prefix.
PYTHONPATH is only on of the way to modify sys.path, which is what is
used by python in the end:
# python will only look for packages which are sys.path
python -c "import sys; print sys.path"
You can check the path of the package after import:
python -c "import numpy; print numpy.__file__"
More information about the NumPy-Discussion