pip installs numpy but poetry does not

See original GitHub issue

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:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

13reactions
asyafEvincedcommented, Feb 3, 2022

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):

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
11reactions
s-besseycommented, Oct 12, 2021

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 numpy installation issues were resolved with a newer pip version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to install Numpy 1.20.2 with Poetry on Python 3.9
When I try to install Numpy 1.20.2 module with Python Poetry 1.1.4 package manager ( poetry add numpy ) in a Python 3.9.0...
Read more >
Installing NumPy
NumPy can be installed with conda , with pip , with a package manager on macOS and Linux, or from source. For more...
Read more >
Why you should use Poetry instead of Pip or Conda for Python ...
Pip complains that the version of numpy to be installed has a conflict with the dependency requirements specified in the pandas library, but ......
Read more >
Installation - SciPy
With pip or Anaconda's conda, you can control the package versions for a specific project to prevent conflicts. Conda also controls non-Python packages, ......
Read more >
Should You Use Upper Bound Version Constraints?
You need a recent NumPy, pip, packaging, Poetry, etc. And just in case you think you have plenty of time, note that Apple...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found