SysInfo
- OS version and name: Windows 7 [Version 6.1.7601]
- Poetry version: 1.0.0a2
- pyproject.toml file (labeled as .txt to upload - nothing special, just default): pyproject.toml.txt
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)
>> poetry --version
Poetry version 1.0.0a2
>> poetry new TestWheelResolver
>> cd TestWheelResolver
>> poetry add pywin32 -vvv
Using virtualenv: C:\Users\king.kyle\AppData\Local\pypoetry\Cache\virtualenvs\mmuu-_zx5-I-Q-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: testwheelresolver is 0.1.0
1: derived: testwheelresolver
1: fact: testwheelresolver depends on pywin32 (^224.0)
1: fact: testwheelresolver depends on pytest (^3.0)
1: selecting testwheelresolver (0.1.0)
1: derived: pytest (^3.0)
1: derived: pywin32 (^224.0)
PyPI: 44 packages found for pytest >=3.0,<4.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: Downloading wheel: pywin32-224-cp27-cp27m-win32.whl
1: Version solving took 16.753 seconds.
1: Tried 1 solutions.
>> poetry add numpy -vvv
Using virtualenv: C:\Users\king.kyle\AppData\Local\pypoetry\Cache\virtualenvs\mmuu-_zx5-I-Q-py3.7
PyPI: No release information found for numpy-0.9.6, skipping
PyPI: No release information found for numpy-0.9.8, skipping
PyPI: No release information found for numpy-1.0.3, skipping
PyPI: No release information found for numpy-1.0.4, skipping
PyPI: No release information found for numpy-1.0b1, skipping
PyPI: No release information found for numpy-1.0b4, skipping
PyPI: No release information found for numpy-1.0b5, skipping
PyPI: No release information found for numpy-1.0rc1, skipping
PyPI: No release information found for numpy-1.0rc2, skipping
PyPI: No release information found for numpy-1.0rc3, skipping
PyPI: No release information found for numpy-1.1.1, skipping
PyPI: No release information found for numpy-1.2.0, skipping
PyPI: No release information found for numpy-1.2.1, skipping
PyPI: No release information found for numpy-1.4.0, skipping
PyPI: 47 packages found for numpy *
Using version ^1.16 for numpy
Updating dependencies
Resolving dependencies...
1: fact: testwheelresolver is 0.1.0
1: derived: testwheelresolver
1: fact: testwheelresolver depends on numpy (^1.16)
1: fact: testwheelresolver depends on pytest (^3.0)
1: selecting testwheelresolver (0.1.0)
1: derived: pytest (^3.0)
1: derived: numpy (^1.16)
PyPI: 44 packages found for pytest >=3.0,<4.0
PyPI: No release information found for numpy-0.9.6, skipping
PyPI: No release information found for numpy-0.9.8, skipping
PyPI: No release information found for numpy-1.0.3, skipping
PyPI: No release information found for numpy-1.0.4, skipping
PyPI: No release information found for numpy-1.0b1, skipping
PyPI: No release information found for numpy-1.0b4, skipping
PyPI: No release information found for numpy-1.0b5, skipping
PyPI: No release information found for numpy-1.0rc1, skipping
PyPI: No release information found for numpy-1.0rc2, skipping
PyPI: No release information found for numpy-1.0rc3, skipping
PyPI: No release information found for numpy-1.1.1, skipping
PyPI: No release information found for numpy-1.2.0, skipping
PyPI: No release information found for numpy-1.2.1, skipping
PyPI: No release information found for numpy-1.4.0, skipping
PyPI: 3 packages found for numpy >=1.16,<2.0
PyPI: Getting info for numpy (1.16.2) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading sdist: numpy-1.16.2.zip
PyPI: Downloading wheel: numpy-1.16.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
1: Version solving took 26.382 seconds.
1: Tried 1 solutions.
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
-vvvoption).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