py2exe

Including PYDs/DLLs in py2exe builds

亡梦爱人 提交于 2019-12-01 16:43:47
One of the modules for my app uses functions from a .pyd file. There's an option to exclude dlls (exclude_dlls) but is there one for including them? The build process doesn't seem to be copying the .pyd in my module despite copying the rest of the files (.py). I also need to include a .dll. How do I get py2exe to include both .pyd and .dll files? Tony Meyer .pyd's and .DLL's are different here, in that a .pyd ought to be automatically found by modulefinder and so included (as long as you have the appropriate "import" statement) without needing to do anything. If one is missed, you do the same

When using py2exe, PyQt application cannot load SQlite database

 ̄綄美尐妖づ 提交于 2019-12-01 12:16:55
My PyQt application works fine when running on Linux, when in my Windows build environment, or frozen on the machine where it was build with py2exe. But after moving the frozen executable and its supporting files to another machine it can't load the database driver. It worked fine when I had Python2.5 and an earlier version of PyQt and py2exe. But after upgrading my toolchain I get these errors: dbname.open returns false lastError(dbname) is "Driver not loaded" I have an sqldrivers folder where I put qsqlite4.dll. This was necessary with the previous build environment, but moving or renaming

Deploying cx_Oracle onto various versions of Oracle Client

筅森魡賤 提交于 2019-12-01 09:07:28
问题 I have some small python apps that use cx_Oracle to connect to an Oracle database. I deploy these apps by compiling them with py2exe, which works fine in many cases. The problem is, there is no standard Oracle Client version (9i and 10g for example) across the many people who need to install this, and it would be very frustrating to try to get everyone to standardize on a single Oracle Client version. I'm using the 9.2 client with cx_Oracle 4.4.1 for 9i at the moment, and so when I py2exe the

Having py2exe include my data files (like include_package_data)

点点圈 提交于 2019-12-01 09:06:45
I have a Python app which includes non-Python data files in some of its subpackages. I've been using the include_package_data option in my setup.py to include all these files automatically when making distributions. It works well. Now I'm starting to use py2exe. I expected it to see that I have include_package_data=True and to include all the files. But it doesn't. It puts only my Python files in the library.zip , so my app doesn't work. How do I make py2exe include my data files? I ended up solving it by giving py2exe the option skip_archive=True . This caused it to put the Python files not

Compiling python code into a single exe

此生再无相见时 提交于 2019-12-01 07:34:18
I've been trying to compile python code into a single exe, and i didn't manage to do it correctly. I've tried pyinstaller, and this is the .spec file: # -*- mode: python -*- a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), 'programs\\toolbox.py'], pathex=['C:\\Users\\Ronaldo\\Desktop\\Python\\pyinstaller']) pyz = PYZ(a.pure) exe = EXE( pyz, a.scripts, a.binaries, a.zipfiles, a.datas, name=os.path.join('dist', 'program.exe'), debug=False, strip=False, upx=True, console=False ) Pyinstaller compiled fine, created a single exe file

Can Microsoft Visual C++ 2008 Redistributable Package be freely redistributed

喜你入骨 提交于 2019-12-01 07:14:34
I am planning to use py2exe to make an application developped with Python 2.6. It seems that my app need the VC redistribuables : http://www.py2exe.org/index.cgi/Tutorial#Step5 I've read this tutorial and the redistribuables license agreement and I am not sure if I can freely redistribute these files with my program. (I don't have VS2008 license) Can I bundle the redistribs into an installer and make the installation transparent for the user or do they have to download the files by their own from Microsoft website? Thanks in advance I think you should be fine if you simply include the

Why am I getting this ImportError?

被刻印的时光 ゝ 提交于 2019-12-01 07:10:51
I have a tkinter app that I am compiling to an .exe via py2exe . In the setup file, I have set it to include lxml , urllib , lxml.html , ast , and math . When I run python setup.py py2exe in a CMD console, it compiles fine. I then go to the dist folder It has created, and run the .exe file. When I run the .exe I get this popup window. (source: gyazo.com ) I then procede to open the Trader.exe.log file, and the the contents say the following; Traceback (most recent call last): File "Trader.py", line 1, in <module> File "lxml\html\__init__.pyc", line 42, in <module> File "lxml\etree.pyc", line

Py2exe with Tkinter

时间秒杀一切 提交于 2019-12-01 06:46:46
I'm trying to convert a basic tkinter GUI program to an .exe using py2exe. However I've run into an error using the following conversion script. # C:\Python26\test_hello_con.py py2exe from distutils.core import setup import py2exe setup(windows=[r'C:\Python26\py2exe_test_tk.py']) C:\Python26\py2exe_test_tk.py is the following code import Tkinter as tk root = tk.Tk() root.title("Test") label1 = tk.Label(root,text="Hello!",font=('arial', 10, 'bold'), bg='lightblue') label1.pack(ipadx=100, ipady=100) root.mainloop() This is the error I get when I try to run the newly created .exe Traceback (most

py2exe: MKL FATAL ERROR: Cannot load mkl_intel_thread.dll

99封情书 提交于 2019-12-01 05:49:53
问题 I'm trying to compile a python program in py2exe. It is returning a bunch of missing modules, and when I run the executable, it says: "MKL FATAL ERROR: Cannot load mkl_intel_thread.dll" All my 'non-plotting' scripts work perfectly, just scripts utilizing 'matplotlib', and 'pyqtgraph' don't work. I've even found the file in Numpy/Core/mkl_intel_thread.dll, and placed it into the folder with the .exe, and it still doesn't work. Does anyone have any idea how this can be solved? I'm using

“maximum recursion depth exceeded” while packaging py file with py2exe

淺唱寂寞╮ 提交于 2019-12-01 05:49:43
The py2exe worked quite well on the same py file several months ago. But when I tried it again today it failed by reporting a “RuntimeError: maximum recursion depth exceeded”. I got an empty “dist” folder as a result. The Py file works normally, it just can't be packaged. I guess there is something wrong with the imported modules in the py file. But I can not figure it out exactly. Does any one know the solution? The begining part of my py file is: import xlrd import wx import wx.lib.filebrowsebutton as filebrowse from scipy.optimize import fsolve import math import threading from sympy import