PyO3 / rust-numpy

PyO3-based Rust bindings of the NumPy C-API
BSD 2-Clause "Simplified" License
1.07k stars 98 forks source link

NumPy installation in virtual environment is not detected on macOS #407

Closed helgee closed 4 months ago

helgee commented 6 months ago

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.

davidhewitt commented 6 months ago

This is probably related to https://github.com/PyO3/pyo3/issues/1741

adamreichold commented 4 months ago

Closing as this is more productively tracked in https://github.com/PyO3/pyo3/issues/1741