Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 使用Nuitka for Python应用程序时出错,该应用程序使用Numpy、Pandas和Plotly_Python 3.x_Windows_Numpy_Mingw W64_Nuitka - Fatal编程技术网

Python 3.x 使用Nuitka for Python应用程序时出错,该应用程序使用Numpy、Pandas和Plotly

Python 3.x 使用Nuitka for Python应用程序时出错,该应用程序使用Numpy、Pandas和Plotly,python-3.x,windows,numpy,mingw-w64,nuitka,Python 3.x,Windows,Numpy,Mingw W64,Nuitka,我开发了一个PyQT5应用程序,它也使用Numpy、Pandas和Plotly。为了打包,我决定使用Nuitka,但是因为该产品是为不熟悉Python的最终用户提供的,所以我希望确保解释器与应用程序一起打包为单个二进制文件(类似于PyInstaller) 我正在运行以下命令,但是我一直在努力找出如何修复的错误: $ python -m nuitka --standalone --show-progress --recurse-all --plugin-enable=numpy main.py

我开发了一个PyQT5应用程序,它也使用Numpy、Pandas和Plotly。为了打包,我决定使用Nuitka,但是因为该产品是为不熟悉Python的最终用户提供的,所以我希望确保解释器与应用程序一起打包为单个二进制文件(类似于PyInstaller)

我正在运行以下命令,但是我一直在努力找出如何修复的错误:

$ python -m nuitka --standalone --show-progress --recurse-all --plugin-enable=numpy main.py
我正在使用PyCharm,所有的库都在项目目录下的虚拟环境中。我使用的Python版本是3.9

在Windows中生成可执行二进制文件,但在运行时,我收到以下错误消息:

C:\Users\user\PycharmProjects\PlotlyExample\main.dist>main
Traceback (most recent call last):
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\__init__.py", line 22, in <module numpy.core>
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\multiarray.py", line 12, in <module numpy.core.multiarray>
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\overrides.py", line 7, in <module numpy.core.overrides>
ImportError: LoadLibraryExW 'C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\_multiarray_umath.pyd' failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\main.py", line 5, in <module>
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\__init__.py", line 140, in <module numpy>
  File "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\__init__.py", line 48, in <module numpy.core>
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 "C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\python.exe"
  * The NumPy version is: "1.19.3"

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

Original error was: LoadLibraryExW 'C:\Users\\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\_multiarray_umath.pyd' failed: The specified module could not be found.
C:\Users\user\PycharmProjects\PlotlyExample\main.dist>main
回溯(最近一次呼叫最后一次):
文件“C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\\uuuu init\uuuu.py”,第22行,在
文件“C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\multiarray.py”,第12行,在
文件“C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\overrides.py”,第7行,在
ImportError:LoadLibraryExW'C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\\u multiarray\u umath.pyd'失败:找不到指定的模块。
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\MAIN.py”,第5行,在
文件“C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\\uuuu init\uuuu.py”,第140行,在
文件“C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\\uuuu init\uuuu.py”,第48行,在
进口恐怖主义:
重要提示:请阅读本文,了解如何解决此问题的建议!
导入numpy C扩展失败。此错误可能发生在以下情况:
原因很多,通常是由于您的设置或NumPy的使用方式问题
安装。
我们在以下网站上汇编了一些常见原因和故障排除提示:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
请注意并检查以下内容:
*Python版本是:Python3.9,来自“C:\Users\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\Python.exe”
*NumPy版本是:“1.19.3”
并确保它们是您期望的版本。
请仔细阅读上面链接的文档以获得进一步帮助。
原始错误是:LoadLibraryExW'C:\Users\\user\PYCHAR~1\PLOTLY~1\MAIN~1.DIS\numpy\core\\u multiarray\u umath.pyd'失败:找不到指定的模块。
示例代码:

有什么想法吗?谢谢