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

Wheel building fails for Python nightly (3.10) #18

Closed
adbar opened this issue Aug 5, 2020 · 9 comments
Closed

Wheel building fails for Python nightly (3.10) #18

adbar opened this issue Aug 5, 2020 · 9 comments

Comments

@adbar
Copy link

adbar commented Aug 5, 2020

Hi, Python 3.10 seems to require a different syntax for wheel building (PEP 517).

I just caught the following error on Travis, see this log (https://travis-ci.org/github/adbar/trafilatura/jobs/715201011):

ERROR: Command errored out with exit status 1:
command: /home/travis/virtualenv/python3.10-dev/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-suhzcy17/pycld3/setup.py'"'"'; file='"'"'/tmp/pip-install-suhzcy17/pycld3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-plzmgvyb
...
DEPRECATION: Could not build wheels for pycld3 which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at pypa/pip#8368.

@adbar
Copy link
Author

adbar commented Oct 6, 2021

Hi @bsolomon1124, Python 3.10 is out, any follow-up on this?

@bsolomon1124
Copy link
Owner

I have neglected to get ahead of this so I will now play catch up as soon as I'm able to this week. Thank you for the reminder.

@bsolomon1124
Copy link
Owner

@adbar are you able to re-run a build using the 3.10.0 final release or point me to such a failed build?

I see that your build failure occurred with 3.10.0a0. I very much want to help out and ensure compatibility with 3.10, but the package installs OK with or without wheel installed for me on MacOS:

$ python3 -V
Python 3.10.0

brad ~/Scripts/python/envs
$ python3 -m pip install pycld3
Collecting pycld3
  Downloading pycld3-0.22.tar.gz (726 kB)
     |████████████████████████████████| 726 kB 3.9 MB/s 
Using legacy 'setup.py install' for pycld3, since package 'wheel' is not installed.
Installing collected packages: pycld3
    Running setup.py install for pycld3 ... done
Successfully installed pycld3-0.22
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the '.../bin/python3 -m pip install --upgrade pip' command.

brad ~/Scripts/python/envs
$ python3 -m pip uninstall pycld3
Found existing installation: pycld3 0.22
Uninstalling pycld3-0.22:
  Would remove:
    .../lib/python3.10/site-packages/cld3/*
    .../lib/python3.10/site-packages/pycld3-0.22-py3.10.egg-info
Proceed (Y/n)? y
  Successfully uninstalled pycld3-0.22

brad ~/Scripts/python/envs
$ python3 -m pip install wheel
Collecting wheel
  Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.37.0
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the '.../bin/python3 -m pip install --upgrade pip' command.

brad ~/Scripts/python/envs
$ python3 -m pip install pycld3
Collecting pycld3
  Using cached pycld3-0.22.tar.gz (726 kB)
Building wheels for collected packages: pycld3
  Building wheel for pycld3 (setup.py) ... done
  Created wheel for pycld3: filename=pycld3-0.22-cp310-cp310-macosx_10_15_x86_64.whl size=510580 sha256=ccb5474ab97b8d5d0d0178bf0f2e0d145eea2211a386aa29c65932eda25e4291
  Stored in directory: /Users/brad/Library/Caches/pip/wheels/45/d5/83/9a7a38189ea5f936288b326094526bbc31fe8a4dc79587fb7a
Successfully built pycld3
Installing collected packages: pycld3
Successfully installed pycld3-0.22
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the '.../bin/python3 -m pip install --upgrade pip' command.

@adbar
Copy link
Author

adbar commented Oct 7, 2021

@bsolomon1124 Thanks for the prompt answer!

Here is a current example on GitHub actions, it seems to be the same problem and only affects Python 3.10:
https://github.com/adbar/trafilatura/runs/3817456324

@bsolomon1124
Copy link
Owner

it seems to be the same problem and only affects Python 3.10

That error seems to be different, indicating that protoc (protobuf) is required since there is no wheel available for Python 3.10, while there is a wheel used for lower versions.

@adbar
Copy link
Author

adbar commented Oct 11, 2021

You're right, they appear to be working on supporting Python 3.10: protocolbuffers/protobuf#9034

@adbar
Copy link
Author

adbar commented Oct 25, 2021

@bsolomon1124 The problem now seems to be fixed, could you give it a try?

@adbar
Copy link
Author

adbar commented Nov 10, 2021

I'm closing the issue since things work, but you might want to think about a new release targeting Python 3.10 explicitly.

@adbar adbar closed this as completed Nov 10, 2021
@juhoinkinen
Copy link

I'm closing the issue since things work, but you might want to think about a new release targeting Python 3.10 explicitly.

Hi @bsolomon1124! A release with wheels for Python 3.10 would be nice to have, especially now when Ubuntu 22.04 is released with 3.10 as the default Python version.

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

3 participants