pip installs numpy but poetry does not
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate - I think it’s here (https://github.com/python-poetry/poetry/issues/1516, or here https://github.com/python-poetry/poetry/issues/3153 - but i’ve done the work arounds ([“setuptools”, “poetry_core>=1.0”]) and nothing)
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption). -
OS version and name: Latest Big Sur - 11.2.3
-
Poetry version: Poetry version 1.1.4
-
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/aronchick/65c366b27ccc7f14caa382f19841e6ab
Issue
Hi – I’ve seen a bunch of other issues related to numpy, and know it’s a numpy problem on Big Sur EXCEPT i think i’ve done everything right (in re upgrading), and I still get the following - works when I install numpy directly via pip, but fails from poetry. What should I do here?
pip install numpy
Collecting numpy
Downloading numpy-1.20.2-cp38-cp38-macosx_10_9_x86_64.whl (16.0 MB)
|████████████████████████████████| 16.0 MB 1.1 MB/s
Installing collected packages: numpy
Successfully installed numpy-1.20.2
poetry add numpy
Using version ^1.20.2 for numpy
Updating dependencies
Resolving dependencies... (0.2s)
Package operations: 1 install, 0 updates, 0 removals
• Installing numpy (1.20.2): Failed
EnvCommandError
[...]
-> /private/var/folders/f_/6hhd4mmx7z734psc7n4m7ygc0000gn/T/pip-req-build-7cbwqfze/build/temp.macosx-11-x86_64-3.9/ccompiler_opt_cache_clib.py
----------------------------------------
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
at /usr/local/lib/python3.9/site-packages/poetry/utils/env.py:1074 in _run
1070│ output = subprocess.check_output(
1071│ cmd, stderr=subprocess.STDOUT, **kwargs
1072│ )
1073│ except CalledProcessError as e:
→ 1074│ raise EnvCommandError(e, input=input_)
1075│
1076│ return decode(output)
1077│
1078│ def execute(self, bin, *args, **kwargs):
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:10 (1 by maintainers)
Top Related StackOverflow Question
I changed the python version in my pyproject.toml and it worked for me (MacOS Big Sur + Poetry version 1.1.12 + python 3.9.9):
Is there any update to this? I’m currently able to install numpy using pip (v21.3) but not poetry. I think this might be a pip version issue, as poetry is using 21.2.4, and stackoverflow seems to have some answers indicating that general
numpyinstallation issues were resolved with a newer pip version.