skywind3000 / PyStand

:rocket: Python Standalone Deploy Environment !!
MIT License
736 stars 81 forks source link

numpy导入问题补录 #62

Open whitecateattea opened 10 months ago

whitecateattea commented 10 months ago

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

skywind3000 commented 10 months ago

thanks

ziwend commented 2 months ago

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:

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.