-
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 Numpy
as Mac OSX Wheel on Windows Laptop & Throws [WinError 145]
#807
Comments
Numpy
as Mac OSX Wheel on Windows Laptop & Throws [WinError 145]
Numpy
as Mac OSX Wheel on Windows Laptop & Throws [WinError 145]Numpy
as Mac OSX Wheel on Windows Laptop & Throws [WinError 145]
The Numpy release files include valid Windows wheels, but it looks Poetry attempts to install the first one (...cp27m-macosx_10_6_intel...): https://pypi.org/project/numpy/#files The correct release should be: |
I just ran into the same issue when creating a new project. I generated the I then used Edit: So I don't know how I got it to install correctly before. I can no longer do it without getting the wheel manually. |
Is there a way around this problem without manually downloading the wheel? This is actually a major frustration right now, as nobody can sensibly create new projects, as everything we do involves numpy (or pandas). |
I think this is a larger issue with Poetry, so I created a new ticket to track this: #944 In the meantime, I found that downloading and linking the correct wheel files for Numpy, pywin32, and pypiwin32 were the only workaround 🤕 |
I'm ~90% certain that I fixed it! I need to add a test, prep a PR for git clone https://github.com/KyleKing/poetry.git
cd poetry
git checkout fix/944-select-wheel
poetry install
# Manually edit: "./poetry/__version__.py" with a new version like: 0.12.11a0
poetry version 0.12.11a0
poetry build To use in Python2 or Python3 environment: pip install ./<pathTo>/poetry/dist/poetry-0.12.11a0-py2.py3-none-any.whl
poetry install
poetry add numpy # rejoice! Let me know if that helps resolve your issue and if this fix works |
I submitted a PR (#955)
|
On MAC Os BigSur (11.1) I've being facing similar issues all day with numpy fail install itself with pandas with Python 3.9.1.6 and poetry 1.1.4. I understood that poetry uses pip which does not use the wheel version of numpy with pip <= 20.2.x This is how I managed to install what I needed : First check the default version of Python linked to poetry (reinstall it if it does not fit) poetry env info | grep -i python
Python: 3.9.1
Implementation: CPython
Python: /usr/local/Cellar/[email protected]/3.9.1_6/Frameworks/Python.framework/Versions/3.9 Install you project and run You should obtain something similar to this pyproject.toml : [tool.poetry]
name = "project1"
version = "0.1.0"
description = ""
authors = [""]
[tool.poetry.dependencies]
python = "^3.9"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api" Launch the poetry shell ➜ project1 poetry shell
Python 2.7 will no longer be supported in the next feature release of Poetry (1.2).
You should consider updating your Python version to a supported one.
Note that you will still be able to manage Python 2.7 projects by using the env command.
See https://python-poetry.org/docs/managing-environments/ for more information.
Spawning shell within /Users/vincent/Library/Caches/pypoetry/virtualenvs/project1-5XOg8Qie-py3.9
➜ project1 . /Users/vincent/Library/Caches/pypoetry/virtualenvs/project1-5XOg8Qie-py3.9/bin/activate
(project1-5XOg8Qie-py3.9) ➜ project1 At this point upgrade pip, wheel and setuptools ! (project1-5XOg8Qie-py3.9) ➜ project1 $ pip install --upgrade pip wheel setuptools
Looking in indexes: https://pypi.python.org/simple/
Collecting pip
Using cached pip-20.3.3-py2.py3-none-any.whl (1.5 MB)
Collecting wheel
Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Collecting setuptools
Using cached setuptools-51.1.2-py3-none-any.whl (784 kB)
Installing collected packages: pip, wheel, setuptools
Attempting uninstall: pip
Found existing installation: pip 20.2.4
Uninstalling pip-20.2.4:
Successfully uninstalled pip-20.2.4
Attempting uninstall: wheel
Found existing installation: wheel 0.35.1
Uninstalling wheel-0.35.1:
Successfully uninstalled wheel-0.35.1
Attempting uninstall: setuptools
Found existing installation: setuptools 50.3.2
Uninstalling setuptools-50.3.2:
Successfully uninstalled setuptools-50.3.2
Successfully installed pip-20.3.3 setuptools-51.1.2 wheel-0.36.2 Now installation should be ok (project1-5XOg8Qie-py3.9) ➜ project1 poetry install
Installing dependencies from lock file
Package operations: 5 installs, 0 updates, 0 removals
- Installing six (1.15.0)
- Installing numpy (1.19.5)
- Installing python-dateutil (2.8.1)
- Installing pytz (2020.5)
- Installing pandas (1.2.0)
Installing the current project: project1 (0.1.0) Yeepee ! |
@vincedgy I tried this, but did not get it to work. Specifically numpy was the problem. However, using: |
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. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate. (Searched for WinError 145, numpy, etc.)
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: Windows 7
Poetry version:
0.12.11
Linked pyproject.toml file (renamed as
.toml.txt
to upload): pyproject.toml.txtIssue
Can be reproduced on my laptop with the below script. When attempting to add Numpy, it returns a directory not empty error and can't get past that.
poetry new test_numpy cd test_numpy poetry install poetry add numpy -vvv
In the debug message below, Poetry downloads
numpy-1.16.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.wh
but I'm on a Windows systemThe text was updated successfully, but these errors were encountered: