[Matplotlib-devel] matplotlib keeps installing it's own (older) numpy

Nathaniel Smith njs at pobox.com
Fri Sep 11 12:40:02 CEST 2015

Did you use pip to install those in-development versions of numpy etc., or
just 'setup.py install'? The latter is unfortunately broken in several ways
-- what might be biting you here is that it does not install the package
metadata (.egg-info or .dist-info) that setuptools and pip need to know
whether numpy is installed or not, what version it is, etc. -- this is
separate from just having a numpy directory on your pythonpath. (Another
thing that will bite you in the future is that when you use
distutils/setup.py to install a package, then it's impossible to correctly
uninstall or upgrade that package later, because it doesn't make a record
of what files were installed.)

The best / only correct way to install a package from source or a git
checkout is 'pip install <source dir>'; never run setup.py directly.

(Yes, this is absurd, but I don't make the rules...)

On Sep 11, 2015 03:30, "Vincent Schut" <schut at sarvision.nl> wrote:

> Hi,
> I'm used to working with unstable versions for most of my numpy/scipy/etc
> stack (usually from git head). So I have installed numpy
> 1.11.0.dev0-3397fce, scipy 0.17.0.dev0-279ef0c, etc. I have extracted
> matplotlib from git, but when I build this ("python setup.py build", or
> even with "python setup.py develop --no-deps"), it keeps building it's own
> numpy 1.9.2 egg, look at this snippet of the output:
> ...
> Installed
> /usr/local/src/matplotlib/.eggs/numpy-1.9.2-py2.7-linux-x86_64.egg
> /usr/lib/python2.7/site-packages/setuptools/dist.py:316: UserWarning:
> Module numpy was already imported from
> /usr/lib/python2.7/site-packages/numpy/__init__.pyc, but
> /usr/local/src/matplotlib/.eggs/numpy-1.9.2-py2.7-linux-x86_64.egg is being
> added to sys.path
> ...
> Strange thing is, in the beginning matplotlib seems to happily recognize
> my numpy:
>                  numpy: yes [version 1.11.0.dev0+3397fce]
>               dateutil: yes [using dateutil version 2.4.2]
>                   pytz: yes [using pytz version 2015.4]
>                 cycler: yes [using cycler version 0.9.0]
>                tornado: yes [using tornado version 4.2.1]
>              pyparsing: yes [using pyparsing version 2.0.3]
>                 libagg: yes [Requires patches that have not been merged
>                         upstream. Using local copy.]
>               freetype: yes [version 2.6.0]
>                    png: yes [version 1.6.18]
>                  qhull: yes [pkg-config information for 'qhull' could not
> be
>                         found. Using local copy.]
> However, it immediately starts building numpy 1.9.2 after that.
> Having more than one version of numpy (or whatever python package) just
> messes up my system, I don't want several different versions of numpy to
> co-exist. Anything I can do to make matplotlib recognize and use my numpy
> from git?
> Best,
> Vincent.
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20150911/d602b33f/attachment.html>

More information about the Matplotlib-devel mailing list