rust-numpy icon indicating copy to clipboard operation
rust-numpy copied to clipboard

NumPy installation in virtual environment is not detected on macOS

Open helgee opened this issue 1 year ago • 1 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.

helgee avatar Jan 23 '24 19:01 helgee

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

davidhewitt avatar Jan 23 '24 20:01 davidhewitt

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

adamreichold avatar Mar 25 '24 09:03 adamreichold