[英]Pyinstaller: No module named 'scipy'
I'm trying to use Pyinstaller to bundle a script that uses Scipy (specifically, the interp1d
function from scipy.interpolate) 我正在尝试使用Pyinstaller捆绑使用Scipy的脚本(特别是interp1d
函数)
Though it normally works for me fine in Python, I get the error ImportError: No module named 'scipy'
虽然在Python中通常可以正常使用,但出现错误ImportError: No module named 'scipy'
I tried it with a simple script that just imports the package 我尝试了一个简单的脚本,它只是导入了包
import scipy
The Pyinstaller code is Pyinstaller代码是
pyinstaller path/to/code.py
I've also tried with hidden-import but no luck. 我也尝试过隐藏导入,但是没有运气。
I know there are other questions out there about importing specific functions from Scipy, but shouldn't I be able to import the main package? 我知道关于从Scipy导入特定功能还有其他问题,但是我不应该能够导入主软件包吗?
I would install everything carefully with anaconda: first download/install anaconda from www.anaconda.com 我会使用anaconda仔细安装所有内容:首先从www.anaconda.com下载/安装anaconda。
then in the anaconda prompt for windows and in a terminal for others: 然后在anaconda提示输入Windows,并在终端输入其他提示:
conda install scipy
... (conda install what you need) ...(conda安装您需要的东西)
conda install -c conda-forge pyinstaller
and pyinstaller.... (what you need) 和pyinstaller ....(您需要什么)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.