Why does pip install matplotlib version 0.91.1 when PyPi shows version 1.0.0?

前端 未结 4 1434
礼貌的吻别
礼貌的吻别 2020-12-13 19:41

Update Oct 15, 2012

PyPi is now showing matplotlib at 1.1.0 so this issue is resolved. Install matplotlib via:

pip install matplotlib

相关标签:
4条回答
  • 2020-12-13 19:44

    Oyvindio's advice is great but first I had to install some headers needed to source-compile matplotlib (otherwise it refused to work). In Ubuntu Lucid, it goes like this:

    $ sudo apt-get build-dep python-matplotlib
    

    And just then it was possible to pip install matplotlib:

    pip install -f  http://garr.dl.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.0.1/matplotlib-1.0.1.tar.gz  matplotlib
    
    0 讨论(0)
  • 2020-12-13 19:52

    This happens because the download link for matplotlib 1.0 on PyPI points to a URL that doesn't appear to pip to be a file in a known format (the URL ends with /download rather than a filename). See this bug filed on pip.

    oyvindio's workaround is the best option I'm aware of for now, until either pip gets more flexible about URLs or matplotlib fixes their PyPI link.

    0 讨论(0)
  • 2020-12-13 19:58

    I've experienced the same problem. I have no idea why it happens, but I do have a fix; use the -f option in pip to tell it where to find the matplotlib sources. (This works in requirements.txt as well).

    pip install -f http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.0/matplotlib-1.0.0.tar.gz matplotlib
    
    0 讨论(0)
  • 2020-12-13 20:10

    I followed @oyvindio's and @elaichi's advice, but was still getting version 0.91.1, for some unknown reason. This was then failing to compile (with the error src/mplutils.cpp:17: error: ‘vsprintf’ was not declared in this scope):

    Installing matplotlib directly from git worked for me:

    pip install -e git+git@github.com:matplotlib/matplotlib.git#egg=matplotlib
    
    0 讨论(0)
提交回复
热议问题