0

While trying to install the tool PrimerProspector from the development version (SVN trunk, as instructed here: 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. This gives me the rather uninformative 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'

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

Directly running setup.py after untarring also renders the same error. Does anyone know how to resolve this? Is there anything I can do to find out?

1 Answer 1

1
+50

The mathplotlib version you're trying to use has been released years before the release of Linux 3.0. That's why it has no support for sys.platform='linux3'. And the Python version you're using is older than 2.7.2, which dropped setting the linux3 value.

You can try to just edit the setupext.py file in the tarball, and in the dict basedir add config for linux3, which would be the same as for linux and linux2.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, that appears to have worked, at least until I got a different error related to probably also an issue with the compatibility of the TCL/TK in the OS. But now I need where to look so as soon as I can I will award you the bounty.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.