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

numpy导入问题补录 #62

Open
whitecateattea opened this issue Nov 19, 2023 · 2 comments
Open

numpy导入问题补录 #62

whitecateattea opened this issue Nov 19, 2023 · 2 comments

Comments

@whitecateattea
Copy link

之前在导入numpy出现问题时出现如下问题
image
需要检查一下原因:python小更新版本,之前出现问题是由于python是3.10.5,而下载的python embed版本是3.10.xx(忘了是多少了,但是不是0.5),必须版本严格一致。
还有anaconda中packages也有可能出现问题。

@skywind3000
Copy link
Owner

thanks

@ziwend
Copy link

ziwend commented Jul 18, 2024

same issue, not version related

conda install numpy, got error as below
but conda uninstall numpy, then pip install numpy==1.26.4 same version which is ok

=========================================================
PyStand-py38-x64\site-packages\numpy\core_init_.py", line 50, in
raise ImportError(msg)
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.12 from "D:\Downloads\PyStand-py38-x64\PyStand.exe"
  • The NumPy version is: "1.26.4"

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

Original error was: DLL load failed while importing _multiarray_umath: 找不到指定的模块。

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "", line 39, in
File "D:\Downloads\PyStand-py38-x64\PyStand.int", line 14, in
from example import start
File "D:\Downloads\PyStand-py38-x64\example.py", line 1, in
import numpy as np
File "D:\Downloads\PyStand-py38-x64\site-packages\numpy_init_.py", line 135, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.

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