PyO3/rust-numpy

NumPy installation in virtual environment is not detected on macOS

helgee opened this issue · 2 comments

  • macOS 14.2.1
  • Python 3.11.7 (installed via pyenv, also tried Homebrew and System Python)
  • Rust 1.75.0

When I try to run the tests with NumPy installed in the active virtual environment I get the following error message:

Failed to access NumPy array API capsule: PyErr { type: <class 'ModuleNotFoundError'>, value: ModuleNotFoundError("No module named 'numpy'"), traceback: None }

It does work however when I install NumPy in the global environment. I also quickly checked in a Linux container and there NumPy is being picked up from the virtual environment as intended.

This is probably related to PyO3/pyo3#1741

Closing as this is more productively tracked in PyO3/pyo3#1741