我试图使用Pyinstaller来捆绑用Python3编写的服务器。部分服务器代码的编写方式是动态加载某些模块,如下所示:
mod_files = [f for f in os.listdir(path)]:
for f in mod_files:
mod = importlib.import_module(mod_name)
如何使用Pyinstaller处理这些文件?
我试图在django rest中使用Pyinstaller,它很好地生成.exe,但是在执行.exe时出现了一个错误,错误是
ModuleNotFoundError: No module named 'rest_framework'
我的问题是如何使用Pyinstaller安装依赖项,或者是否有其他方法。
我有一个使用Pynput模块的python脚本。当我在Ubuntu20.04LTS GUI上从终端运行python脚本时,它运行得非常完美。
$ pyinstaller --onefile vTwo.py
cd ./dist
./vTwo
运行时发生错误./script:
ImportError: this platform is not supported: No module named 'pynput.keyboard._xorg'
Try one of the following resolutions:
* Please make sure that you h
我正在使用一个名为pattern.de ()的模块来实现一个文本挖掘工具。为了让我的同事可以使用它,我想把它转换成一个独立的应用程序。因为我使用的是PyInstaller。当我运行最终的可执行文件时,我得到以下ImportError
Traceback (most recent call last):
File "<string>", line 4, in <module>
ImportError: No module named pattern.de
test returned -1
LOADER: OK.
LOADER: Cleaning up
On PC1,我有一个程序中使用了A B C包,我想通过Pyinstaller将该程序与包A B(出于某种原因不包括C)一起打包,以获得另一台安装了python和包C的机器PC2,我希望在PC2上运行这个"main.exe“(未嵌入C包),在此期间,在PC2上安装的软件包C称为.。
这可以实现吗?怎么做呢?
我在PC1上按:pyinstaller main.py --exclude-module C打包程序,并且如预期的那样,未能在PC2上使用ModuleNotFoundError: No module named 'C'执行main.exe,因为安装在PC2上的软件包
我正在尝试创建一个使用pyinstaller的独立程序。在此过程中,我遇到以下错误消息:
`Traceback (most recent call last):
File "<string>", line 13, in <module>
File "/opt/local/anaconda/lib/python2.7/site-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
exec(bytecode, module.__dict__)
使用PyInstaller,我从python脚本创建了一个可执行文件,如下所示:
pyinstaller --onefile pythonScriptName.py
但是,当我运行可执行文件时,我会得到一个错误ImportError: No module named 'MyModule'。“MyModule”是我在脚本中使用的自定义模块的占位符名称。因此,我假设PyInstaller没有打包定制模块。有什么办法让它这么做吗?
我一直在开发一个需要使用pyinstaller加载数据文件(png文件和pot文件)的应用程序,我一直在跟踪temp文件夹中的文件,由于某些原因,数据文件没有添加到temp文件夹中。我做了一个小模块来跟踪目录,如下所示:
import os, sys
def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
try:
# PyInstaller creat
我想要执行一个可执行文件,但是每次我运行.exe时它都会编写ImportError: No module named 'tkinter',而我在Stackowerflow上读到的所有内容都帮不了我!
我的python程序很简单(ODE ),并且只请求:
from math import*
from pylab import*
import numpy as np
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
我将prog.py的副本粘贴到pyInstaller所在的C:\Python\
当我使用pyinstaller从python编译到exe时,会出现一个错误(我使用python 2.7.16):
Traceback (most recent call last):
File "bloepie.py", line 1, in <module>
File "c:\users\stefan\appdata\local\temp\pip-install-v9ecuy\pyinstaller\PyInstaller\loader\pyimod03_importers.py", line 395, in load_module
F