Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 Support #370

Open
LukeShortCloud opened this issue Oct 29, 2019 · 1 comment
Open

Python 3 Support #370

LukeShortCloud opened this issue Oct 29, 2019 · 1 comment

Comments

@LukeShortCloud
Copy link
Contributor

With upstream Python 2 going end-of-life in a few months, it might be a good idea to start working on compatibility with Python 3. The documentation states that only Python 2.7 is supported. Distributions such as Fedora 32 are planning to remove most of the Python 2 libraries.

Currently, installing with pip via Python 3 fails with this error below. There are likely more issues to be addressed beyond this.

$ pip3 install infrared
Collecting infrared
  Downloading https://files.pythonhosted.org/packages/40/62/2b8c7ea3df7bbb98e7fa9ab6d5083ab47c78c553c7f954514bfa5819a33f/infrared-2.0.0rc1.tar.gz (126kB)
     |████████████████████████████████| 133kB 1.0MB/s 
    ERROR: Command errored out with exit status 1:
     command: /home/user/venv_infarered/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-a4egy9u9/infrared/setup.py'"'"'; __file__='"'"'/tmp/pip-install-a4egy9u9/infrared/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-a4egy9u9/infrared/pip-egg-info
         cwd: /tmp/pip-install-a4egy9u9/infrared/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-a4egy9u9/infrared/setup.py", line 3, in <module>
        from pip import req
    ImportError: cannot import name 'req' from 'pip' (/home/user/venv_infarered/lib/python3.7/site-packages/pip/__init__.py)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
@ariemaron
Copy link

As a work around, you can roll back to pip3 version 9.0.3.

python3 -m pip install pip==9.0.3

It seems that there is no pip.req module in versions later than this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants