Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import numpy c-extension on 3.9 #170

Open
erooke opened this issue Feb 23, 2022 · 2 comments
Open

Can't import numpy c-extension on 3.9 #170

erooke opened this issue Feb 23, 2022 · 2 comments

Comments

@erooke
Copy link

erooke commented Feb 23, 2022

Creating a new 3.9 project and installing numpy 1.22.2 results in a broken numpy install.

The only command I've run is pyflow install numpy which resulted in the following pyproject.toml

[tool.pyflow]
name = "npTest"
py_version = "3.9"
version = "0.1.0"

[tool.pyflow.scripts]

[tool.pyflow.dependencies]
numpy = "^1.22.2"

[tool.pyflow.dev-dependencies]

Running pyflow python and then import numpy as np triggers the following complaint

ImportError: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.9 from "/home/ethan/code/npTest/__pypackages__/3.9/.venv/bin/python"
  * The NumPy version is: "1.22.2"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named 'numpy.core._multiarray_umath'

Not sure where to really proceed from there in the way of debugging however.

@harisraharjo
Copy link

In my case, eventhough I'm not importing numpy, the same error message appear. I have from jax import random. which actually I'm not sure if that package has numpy as it's deps

@GallagherCommaJack
Copy link

@harisraharjo jax does in fact import numpy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants