Skip to content

Invalid environment marker: platform_python_implementation #231

Closed
@guettli

Description

@guettli

I want to install html5lib editable and get this error:

host@host~$ pip install -e git+https://github.com/html5lib/html5lib-python.git#egg=html5lib
Obtaining html5lib from git+https://github.com/html5lib/html5lib-python.git#egg=html5lib
  Cloning https://github.com/html5lib/html5lib-python.git to ./src/html5lib
    Complete output from command python setup.py egg_info:
    error in html5lib setup command: Invalid environment marker: platform_python_implementation == 'CPython'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /home/foo_eins_d/src/html5lib

My pip version:

user@host:~$  pip --version
pip 7.1.2 from /home/foo_eins_d/local/lib/python2.7/site-packages (python 2.7)

Which version of pip is needed, or what else can I do to get pip install -e ... working?

Activity

gsnedders

gsnedders commented on Apr 22, 2016

@gsnedders
Member

This is caused by a backwards incompatible change in setuptools. I can't find anything saying what version is needed quickly; sadly there's no way to be compatible with both old and new versions of setuptools. :(

I think we need setuptools 20.2?

gsnedders

gsnedders commented on Apr 22, 2016

@gsnedders
Member

Perhaps pypa/setuptools#503 means that the legacy syntax works with v20.6.6? In which case we can move back to the legacy syntax then we only don't support support 20.2 to 20.6.5, but otherwise works.

gsnedders

gsnedders commented on Apr 23, 2016

@gsnedders
Member

pypa/packaging#72 (comment) summarises this mess.

gsnedders

gsnedders commented on Apr 30, 2016

@gsnedders
Member

Fixed by #234. We don't work with 20.2 to 20.6 (released mid-Feb till late-Mar 2016), but should work with both older and newer releases.

gsnedders

gsnedders commented on Jun 6, 2016

@gsnedders
Member

Ergh. This is way worse than I thought. https://gsnedders.github.io/python-marker-test/results.html is a better summary of what supports what.

gsnedders

gsnedders commented on Jun 6, 2016

@gsnedders
Member

So the options are:

  • platform_python_implementation: doesn't work before 18.5 (except on Jython/IronPython!)
  • platform.python_implementation: doesn't work before 20.6.6
  • python_implementation: doesn't work before 20.10.0 on Jython/IronPython, and doesn't work between 20.2 and 20.10.0 on other implementations.

wrt system versions: platform_python_implementation will work with Ubuntu 16.04 LTS and Debian Jessie backports, but nothing older; python_implementation will work on Debain Jessie but won't work on Ubuntu 16.04 LTS though will work on every other release of Ubuntu from 14.04 LTS onwards. (RHEL is massively out of date and will always require an upgrade.)

On the whole I'm in favour of reverting to platform_python_implementation, although it limits the usefulness of the system setuptools. It also allows us to have identical markers in requirements files (consumed by pip) and in setup.py (consumed by setuptools).

added a commit that references this issue on Jun 6, 2016

Try fixing html5lib#231 again: Return to using platform_python_implem…

added a commit that references this issue on Jun 6, 2016

fixup! Try fixing html5lib#231 again: Return to using platform_python…

added this to the 0.99999999 milestone on Jun 6, 2016

6 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @gsnedders@guettli

        Issue actions

          Invalid environment marker: platform_python_implementation · Issue #231 · html5lib/html5lib-python