如何在virtualenv的Mac 10.7上安装MatPlotLib [英] How to install MatPlotLib on Mac 10.7 in virtualenv

查看:98
本文介绍了如何在virtualenv的Mac 10.7上安装MatPlotLib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我要做的事情:

(SAASSenv)miki725mac:SAASSenv miki725$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
(SAASSenv)miki725mac:SAASSenv miki725$ 
(SAASSenv)miki725mac:SAASSenv miki725$ pip install http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.0.1/matplotlib-1.0.1.tar.gz
Downloading/unpacking http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.0.1/matplotlib-1.0.1.tar.gz
  Downloading matplotlib-1.0.1.tar.gz (13.3Mb): 13.3Mb downloaded
  Running setup.py egg_info for package from http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.0.1/matplotlib-1.0.1.tar.gz
    basedirlist is: []
    ============================================================================
    BUILDING MATPLOTLIB
                matplotlib: 1.0.1
                    python: 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
                            [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
                  platform: darwin

    REQUIRED DEPENDENCIES
                     numpy: 1.6.0
                 freetype2: 13.0.7

    OPTIONAL BACKEND DEPENDENCIES
                    libpng: 1.4.8
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/var/folders/tk/xpmf2q_10qg45c9g_xzmvy4r0000gn/T/pip-02sOum-build/setup.py", line 162, in <module>
        if check_for_tk() or (options['build_tkagg'] is True):
      File "setupext.py", line 832, in check_for_tk
        (Tkinter.__version__.split()[-2], Tkinter.TkVersion, Tkinter.TclVersion))
    IndexError: list index out of range
    Complete output from command python setup.py egg_info:
    basedirlist is: []

============================================================================

BUILDING MATPLOTLIB

            matplotlib: 1.0.1

                python: 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)

                        [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]

              platform: darwin



REQUIRED DEPENDENCIES

                 numpy: 1.6.0

             freetype2: 13.0.7



OPTIONAL BACKEND DEPENDENCIES

                libpng: 1.4.8

Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/var/folders/tk/xpmf2q_10qg45c9g_xzmvy4r0000gn/T/pip-02sOum-build/setup.py", line 162, in <module>

    if check_for_tk() or (options['build_tkagg'] is True):

  File "setupext.py", line 832, in check_for_tk

    (Tkinter.__version__.split()[-2], Tkinter.TkVersion, Tkinter.TclVersion))

IndexError: list index out of range

----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /Users/miki725/.pip/pip.log

请帮助我.如果您需要任何其他信息,请告诉我.谢谢.

Please help me. If you need any additional info, please let me know. Thank you.

推荐答案

做到这一点

pip install -e https://github.com/matplotlib/matplotlib.git matplotlib

pip install -e https://github.com/matplotlib/matplotlib.git matplotlib

或克隆然后安装

或看看@

http://jholewinski.org /blog/installing-matplotlib-on-os-x-10-7-with-homebrew/

但这不是一个狮子问题,只是一个python 2.7.2错误.同事的雪豹机器上也有同样的问题

but it s not a lion problem just a python 2.7.2 bug. had the same problem on a colleagues snow leopard machine

假设您正在使用brew

suppose your are using brew

希望这会有所帮助

这篇关于如何在virtualenv的Mac 10.7上安装MatPlotLib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆