繁体   English   中英

pip-在virtualenv中安装matplotlib

[英]pip - install matplotlib in virtualenv

我想使用pip将matplotlib安装到virtualenv。 (pip 7.1.0,python 3.4)

$ virtualenv venv
$ source venv/bin/activate
$ pip install matplotlib

...
REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.9.2]
                   six: yes [using six version 1.9.0]
              dateutil: yes [using dateutil version 2.4.2]
                  pytz: yes [using pytz version 2015.4]
               tornado: yes [using tornado version 4.2.1]
             pyparsing: yes [using pyparsing version 2.0.3]
                 pycxx: yes [Official versions of PyCXX are not compatible
                        with matplotlib on Python 3.x, since they lack
                        support for the buffer object.  Using local copy]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]

我设法安装了大多数依赖项,但是pycxxlibaag失败并出现类似错误:

Collecting pycxx
  Could not find a version that satisfies the requirement pycxx (from versions: )
No matching distribution found for pycxx

我的问题是:我做错了什么? 有一些解决方法吗?

我可以(也许)使用发行版软件包管理器安装matplotlib,然后以某种方式将其导入virtualenv-这是我需要帮助的地方。

您已经在venv中安装了numpy和scipy吗? 我遇到了numpy,scipy和matplotlib的安装问题,并且在环境中升级pip和setuptools修复了所有问题:

$ pip install -U pip
$ pip install -U setuptools

如果使用软件包管理器安装matplotlib,则可以在设置venv时执行以下操作:

$ virtualenv --system-site-packages myvenv

那应该让matplotlib进入myvenv

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM