-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Poetry Downloads 1st Wheel File from PyPi Regardless of Python version or OS. Unusable on Windows for projects with Pandas/Numpy #944
Comments
Tested fix (new debugging lines start with an asterisks (py372) C:\Users\king.kyle\testing>poetry add pywin32 -vvv
Using virtualenv: C:\Users\king.kyle\AppData\Local\pypoetry\Cache\virtualenvs\testing-py3.7
PyPI: No release information found for pywin32-210, skipping
PyPI: No release information found for pywin32-214, skipping
PyPI: 3 packages found for pywin32 *
Using version ^224.0 for pywin32
Updating dependencies
Resolving dependencies...
1: fact: testing is 0.1.0
1: derived: testing
1: fact: testing depends on pywin32 (^224.0)
1: fact: testing depends on pytest (^3.0)
1: selecting testing (0.1.0)
1: derived: pytest (^3.0)
1: derived: pywin32 (^224.0)
1: fact: pytest (3.10.1) depends on py (>=1.5.0)
1: fact: pytest (3.10.1) depends on six (>=1.10.0)
1: fact: pytest (3.10.1) depends on attrs (>=17.4.0)
1: fact: pytest (3.10.1) depends on more-itertools (>=4.0.0)
1: fact: pytest (3.10.1) depends on atomicwrites (>=1.0)
1: fact: pytest (3.10.1) depends on pluggy (>=0.7)
1: fact: pytest (3.10.1) depends on colorama (*)
1: selecting pytest (3.10.1)
1: derived: colorama (*)
1: derived: pluggy (>=0.7)
1: derived: atomicwrites (>=1.0)
1: derived: more-itertools (>=4.0.0)
1: derived: attrs (>=17.4.0)
1: derived: six (>=1.10.0)
1: derived: py (>=1.5.0)
PyPI: No release information found for pywin32-210, skipping
PyPI: No release information found for pywin32-214, skipping
PyPI: 1 packages found for pywin32 >=224.0,<225.0
PyPI: Getting info for pywin32 (224) from PyPI
PyPI: No dependencies found, downloading archives
*PyPI: Attempting to determine best match for: {'plat': 'windows', 'machine': 'amd64', 'pyver': ('3', '7', '2')}
*PyPI: Found best wheel match: https://files.pythonhosted.org/packages/a3/8a/eada1e7990202cd27e58eca2a278c344fef190759bbdc8f8f0eb6abeca9c/pywin32-224-cp37-cp37m-win_amd64.whl
*PyPI: Downloading wheel: pywin32-224-cp37-cp37m-win_amd64.whl
1: selecting pywin32 (224)
1: selecting colorama (0.4.1)
1: selecting pluggy (0.9.0)
1: selecting atomicwrites (1.3.0)
1: selecting more-itertools (6.0.0)
1: selecting attrs (19.1.0)
1: selecting six (1.12.0)
1: selecting py (1.8.0)
1: Version solving took 1.654 seconds.
1: Tried 1 solutions.
Package operations: 1 install, 0 updates, 0 removals
Writing lock file
- Installing pywin32 (224)
(py372) C:\Users\king.kyle\testing> |
@sdispater, Is there an update on this issue? I can't use poetry until it is fixed. |
@facthunter there is a PR pending review #955 I built a Poetry wheel from my branch that you can install if you absolutely need it. See #807 (comment) |
Tested installing |
I still have this issue, reproduce:
|
@yihuang that is expected behaviour at the moment when PyPI metadata does not contain requirement information. We pick the first available wheel and derive core metadata from it. This is not the wheel that gets installed. This is only used for inspection. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).SysInfo
Issue
I think there is a problem in the wheels resolver in Poetry. I found a couple of test cases that build wheels targeting multiple OS and Python versions. In all cases, it looks like Poetry is downloading the first Wheel regardless of Python/OS constraints, then crashes with a
[WinError 145] The directory is not empty: 'C:\\Users\\KING~1.KYL\\AppData\\Local\\Temp\\tmpopks2va_'
.Originally I posted issue #807, but I think this might be a larger issue with Poetry and not just Numpy, so I think a new ticket is more appropriate to track this issue.
Below is the abbreviated output for attempting an install of each of numpy and pywin32. The full log for all 6 packages is attached: FullLogs.txt
I think the relevant line is
PyPI: Downloading wheel: pywin32-224-cp27-cp27m-win32.whl
(cp27) where the correct version should have been:pywin32-224-cp37-cp37m-win32.whl
(cp37)I will have some time this weekend to try to help figure out the root cause and if so, submit a PR. I'll also compare to Mac and see if this is Windows-only. Need to consider the wide list of possible platforms: https://github.com/easybuilders/easybuild/wiki/OS_flavor_name_version
This might be what needs to be updated: https://github.com/sdispater/poetry/blob/271e995844db11a40c7c4a0b320bf9bd600db444/poetry/repositories/pypi_repository.py#L423-L425
Update: so the OSError is Windows-only. On Mac, the wrong cp27 wheel is downloaded for cp37 (
[tool.poetry.dependencies]\n python = "^3.7"
) for both Pillow and Pygame, but install completes without issue.I started a potential fix in this branch: https://github.com/KyleKing/poetry/tree/fix/944-select_wheel
The text was updated successfully, but these errors were encountered: