Pythonconda安装旧版matplotlib keyerror linux3

Python Conda install old version of matplotlib keyerror linux3

尝试从开发版本安装工具 PrimerProspector(SVN 主干,按照此处的指示:http://pprospector.sourceforge.net/install/install.html) I tried creating a conda environment to resolve the dependencies in an elegant way (I am running an Ubuntu server 16.04.3 LTS machine with conda 4.4.8). The PyCogent and Numpy can easily be installed in the required version using pip install when the environment (with python 2.6) is activated. I have conda forge in my channels. However, when running pip install matplotlib==0.98.5.3 I run into the issue that there is no such version available (Could not find a version that satisfies the requirement matplotlib==0.98.5.3 (from versions: 0.86, 0.86.1, 0.86.2, 0.91.0, 0.91.1, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1rc1, 1.4.1, 1.4.2, 1.4.3, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 2.0.0b1, 2.0.0b2, 2.0.0b3, 2.0.0b4, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.0.2, 2.1.0rc1, 2.1.0, 2.1.1, 2.1.2)). Additionally I get an InsecurePlatformWarning which is apparently common with an older Python distribution. Nevertheless, as the source was available I tried using pip to install from the tarball。这给了我相当无用的信息 KeyError: 'linux3'

Complete output from command python setup.py egg_info:
    ============================================================================
    BUILDING MATPLOTLIB
                matplotlib: 0.98.5.3
                    python: 2.6.9 | packaged by conda-forge | (unknown, Apr 29
                            2017, 15:44:38)  [GCC 4.8.2 20140120 (Red Hat
                            4.8.2-15)]
                  platform: linux3

    REQUIRED DEPENDENCIES
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-7ZwjL5-build/setup.py", line 99, in <module>
        if not check_for_numpy():
      File "setupext.py", line 497, in check_for_numpy
        add_base_flags(module)
      File "setupext.py", line 319, in add_base_flags
        [os.path.join(p, 'include') for p in basedir[sys.platform] ])
    KeyError: 'linux3'

    ----------------------------------------

解压后直接运行setup.py也是同样的错误。有谁知道如何解决这个问题?我能做些什么来找出答案吗?

您尝试使用的 mathplotlib 版本已在 Linux 3.0 发布前数年发布。这就是它不支持 sys.platform='linux3' 的原因。并且您使用的 Python 版本早于 2.7.2,它放弃了设置 linux3 值。

您可以尝试只编辑 tarball 中的 setupext.py 文件,并在字典 basedir 中为 linux3 添加配置,这与 [=15] 相同=] 和 linux2.