pyinstaller

FileNotFoundError: [Errno 2] No such file or directory: .constants.json

。_饼干妹妹 提交于 2020-01-11 11:32:06
问题 I have coded a python script involving excel sheet manipulation using openpyxl . Script is running fine using python interpreter. Once I have made single windows executable using pyinstaller and running the program, its throwing error: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\....\\AppData\\Local\\Temp\\_MEI31842\\.constants.json' Any suggestion? 回答1: You might need to tell PyInstaller to include this file: Put a file hook-openpyxl.py in the directory from where you

PyInstaller runs fine but exe file errors: No module named, Failed to Execute Script

。_饼干妹妹 提交于 2020-01-11 10:17:30
问题 I am running the following code: pyinstaller --onefile main.py main.py looks like: import sys import os sys.path.append(r'C:\Model\Utilities') from import_pythonpkg import * ...... import_pythonpkg.py looks like: from astroML.density_estimation import EmpiricalDistribution import calendar import collections from collections import Counter, OrderedDict, defaultdict import csv .... By running the pyinstaller on main.py , main.exe file is created successfully. But when I run main.exe it gives

Cannot convert Python script into an executable using Pyinstaller: Empty dist folder & PyQt5 not found

断了今生、忘了曾经 提交于 2020-01-10 05:58:05
问题 I am using PyInstaller to create a stand-alone executable file from my Python script. The Python script was created by Python 3.7.1 and I use Anaconda. When I run Pyinstaller, it creates a .spec file and build and dist folders. However, the dist folder is empty. No errors were reported by Pyinstaller apart from "cannot find existing pyqt5 plugin directories". How can I solve this problem? Or how I can troubleshoot it so I can understand where the problem is? 回答1: After several hours reading

PyInstaller does NOT work when including Pysnmp

a 夏天 提交于 2020-01-10 05:48:06
问题 Just trying one of the official documentation site examples: from pysnmp.hlapi import * errorIndication, errorStatus, errorIndex, varBinds = next( getCmd(SnmpEngine(), CommunityData('public'), UdpTransportTarget(('192.168.1.14', 161)), ContextData(), ObjectType(ObjectIdentity('1.3.6.1.2.1.1.1.0'))) ) if errorIndication: print(errorIndication) elif errorStatus: print('%s at %s' % ( errorStatus.prettyPrint(), errorIndex and varBinds[int(errorIndex)-1][0] or '?' ) ) else: for varBind in varBinds

pyinstaller的安装以及使用

╄→尐↘猪︶ㄣ 提交于 2020-01-09 22:44:20
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 最近用python写脚本让windows10启动运行,因为python脚本需要调用程序python解释执行,所以系统没反应(个人推测原因),所以想到用pyinstaller转换成exe程序让系统执行!关于pip安装,请自行百度 使用pip安装pyinstaller pip install pyinstaller 运行pyinstaller生成exe pyinstaller -F xxx.py -F 指定生成exe文件的脚本文件 -c 指定程序在命令行(cmd)执行 -i 指定程序图标(对图标大小有要求) #程序默认带-i参数,所以不需要添加 然后复制到启动项下开机执行 Reference: https://www.cnblogs.com/jiangnanyanyuchen/p/9834037.html https://pyinstaller.readthedocs.io/en/stable/ 官网 来源: oschina 链接: https://my.oschina.net/doctorlzr1988/blog/3155555

In PyInstaller, Why Won't NumPy.Random.Common Load as a Module?

半腔热情 提交于 2020-01-09 10:53:53
问题 I'm trying to compile a .py program into a Windows .exe using PyInstaller. Whenever I try to execute the .exe, the terminal opens, then closes quickly with the error: ImportError: Unable to import required dependencies: numpy: No module named 'numpy.random.common' I'm not explicitly importing numpy; it's being import by pandas. I also get this long list of warnings about modules that couldn't be loaded in the warnings log for pyinstaller. I've tried adding hiddenimports=['numpy.random.common'

In PyInstaller, Why Won't NumPy.Random.Common Load as a Module?

两盒软妹~` 提交于 2020-01-09 10:53:51
问题 I'm trying to compile a .py program into a Windows .exe using PyInstaller. Whenever I try to execute the .exe, the terminal opens, then closes quickly with the error: ImportError: Unable to import required dependencies: numpy: No module named 'numpy.random.common' I'm not explicitly importing numpy; it's being import by pandas. I also get this long list of warnings about modules that couldn't be loaded in the warnings log for pyinstaller. I've tried adding hiddenimports=['numpy.random.common'

In PyInstaller, Why Won't NumPy.Random.Common Load as a Module?

瘦欲@ 提交于 2020-01-09 10:53:40
问题 I'm trying to compile a .py program into a Windows .exe using PyInstaller. Whenever I try to execute the .exe, the terminal opens, then closes quickly with the error: ImportError: Unable to import required dependencies: numpy: No module named 'numpy.random.common' I'm not explicitly importing numpy; it's being import by pandas. I also get this long list of warnings about modules that couldn't be loaded in the warnings log for pyinstaller. I've tried adding hiddenimports=['numpy.random.common'

PyInstaller FrozenImporter has no attribute archive

本秂侑毒 提交于 2020-01-06 19:37:32
问题 Pyinstaller and py2exe seem to be always produce errors when trying to run. Even a simple test program that pops a blank window up fails to run. PyInstaller error: Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\python27\lib\site-packages\PyInstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_importers.py", line 270, in load_module exec(bytecode, module.__dict__) File "C:\Users\jammerxd\Desktop\VEXDisplayServer\build\test\out00-PYZ.pyz\wx", line 22, in <module> File

如何使Python脚本独立可执行文件在没有任何依赖的情况下运行? [关闭]

孤人 提交于 2020-01-06 15:45:47
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我正在构建一个Python应用程序,并且不想强迫我的客户安装Python和模块。 我也想将我的应用程序设为开源。 那么,有没有办法将Python脚本编译为独立的可执行文件? #1楼 对于Python 3.2脚本,唯一的选择是Cxfreeze。 从源代码构建它,否则它将不起作用。 对于python 2.x,我建议使用pyinstaller,因为它可以将python程序打包在一个可执行文件中,这与CxFreeze一样,它也输出库。 #2楼 我还建议使用 pyinstaller 以获得更好的向后兼容性,例如python 2.3-2.7 。 对于 py2exe ,您必须具有python 2.6 #3楼 您可能希望调查 Nuitka 。 它需要python源代码并将其转换为C ++ API调用。 然后将其编译为可执行二进制文件(在Linux上为ELF)。 它已经存在了几年,并且支持多种Python版本。 如果使用它,您可能还会获得性能上的改进。 推荐的。 #4楼 使用py2exe...。使用以下设置文件: from distutils.core import setup import py2exe from distutils.filelist import findall import matplotlib setup