pyinstaller and pyopengl

336 views
Skip to first unread message

Nando Beifiori

unread,
Jun 22, 2012, 10:18:18 AM6/22/12
to PyInstaller
Hi all,
I'm facing some problems with pyinstaller and pyopengl and i was
wondering if you could help me.

My set up is:
windows7 prof
python 2.7
wxpython 2.8.12.1
pyopengl 3.0.1
pyinstaller 1.5.1
everything on a 64 environment.


My code works well by sources, but when I build the exe and I start
it, I got this message:

Traceback (most recent call last):
File "app\build\pyi.win32\app\outPYZ1.pyz/gui.canvas3", line 97, in
OnDraw
File "app\build\pyi.win32\app\outPYZ1.pyz/gui.canvas3", line 581, in
_draw
File "app\build\pyi.win32\app\outPYZ1.pyz/gui.canvas3", line 1047,
in axis
File "app\build\pyi.win32\app\outPYZ1.pyz/
OpenGL.platform.baseplatform", line
340, in __call__
OpenGL.error.NullFunctionError: Attempt to call an undefined function
glutBitmap
Character, check for bool(glutBitmapCharacter) before calling


I use this script to get the exe:

cd pyinstaller-1.5.1
python -O Configure.py
python Makespec.py -X --icon=..\gui\favicon.ico ..\app.py
python -O Build.py app/app.spec
cd ..


And this is the .spec file:

# -*- mode: python -*-
a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'),
os.path.join(HOMEPATH,'support\\useUnicode.py'), '..\\app.py'],
pathex=['C:\\Users\\user\\gui\\pyinstaller-1.5.1'])
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
exclude_binaries=1,
name=os.path.join('build\\pyi.win32\\app', 'app.exe'),
debug=False,
strip=False,
upx=True,
console=True , icon='..\\gui\\favicon.ico')
coll = COLLECT( exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name=os.path.join('dist', 'app'))


glutbitmapcharacter is a function located in one the libraries in C:
\Python27\Lib\site-packages\OpenGL\DLLS directory, which contains
freeglut.dll, gle32.dll and glut32.dll.
It works if I start the software by python app.py, but not by app.exe.
Maybe pyinstaller is not able to link the software to opengl dlls?
Google in this case was not helpful.
I tried to copy these dlls in the same folder of the exe, but it
didn't worked.
I also tried to add OpenGL.GLUT.glutBitmapCharacter in the hook-
OpenGL, but it didn't worked.
Can you please suggest me anything to try to get this issue fixed?

Best regards.
Nando

Martin Zibricky

unread,
Jun 22, 2012, 2:29:44 PM6/22/12
to pyins...@googlegroups.com
Nando Beifiori píše v Pá 22. 06. 2012 v 07:18 -0700:
> Can you please suggest me anything to try to get this issue fixed?
>
> Best regards.
> Nando

Please try development version.

Nando Beifiori

unread,
Jun 25, 2012, 3:38:58 AM6/25/12
to pyins...@googlegroups.com
Hi Martin,
I have tried pyinstaller-pyinstaller-2145d84.tar.gz, it gives me the following log:

C:\Users\user\gui\pyinstaller-dev>python pyinstaller.py ..\app.py
588 INFO: wrote C:\Users\user\gui\pyinstaller-dev\app\app.spec
842 INFO: Testing for ability to set icons, version resources...
1111 INFO: ... resource update available
1178 INFO: UPX is not available.
5404 INFO: checking Analysis
5404 INFO: building Analysis because out00-Analysis.toc non existent
5411 INFO: running Analysis out00-Analysis.toc
5411 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable

12411 INFO: Searching for assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none ...
12411 INFO: Found manifest C:\Windows\WinSxS\Manifests\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_750b37ff97f4f68b.manifest
12441 INFO: Searching for file msvcr90.dll
12441 INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_750b37ff97f4f68b\msvcr90.dll
12457 INFO: Searching for file msvcp90.dll
12457 INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_750b37ff97f4f68b\msvcp90.dll
12457 INFO: Searching for file msvcm90.dll
12457 INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_750b37ff97f4f68b\msvcm90.dll
12669 INFO: Analyzing C:\Users\user\gui\pyinstaller-dev\support\_pyi_bootstrap.py
13639 INFO: Analyzing C:\Users\user\gui\pyinstaller-dev\PyInstaller\loader\archive.py
13730 INFO: Analyzing C:\Users\user\gui\pyinstaller-dev\PyInstaller\loader\carchive.py
13822 INFO: Analyzing C:\Users\user\gui\pyinstaller-dev\PyInstaller\loader\iu.py

13851 INFO: Analyzing ..\app.py
17793 INFO: checking Tree
17809 INFO: building because out00-Tree.toc missing or bad
17809 INFO: building Tree out00-Tree.toc
18430 INFO: checking Tree
18445 INFO: building because out01-Tree.toc missing or bad
18445 INFO: building Tree out01-Tree.toc
23306 INFO: Hidden import 'encodings' has been found otherwise
23306 INFO: Looking for run-time hooks
23322 INFO: Analyzing rthook C:\Users\user\gui\pyinstaller-dev\support/rthooks/pyi_rth_Tkinter.py
23401 INFO: Analyzing rthook C:\Users\user\gui\pyinstaller-dev\support/rthooks/pyi_rth_opengl.py
23401 INFO: Analyzing rthook C:\Users\user\gui\pyinstaller-dev\support/rthooks/pyi_rth_encodings.py
23494 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
28167 ERROR: lib not found: gdiplus.dll dependency of c:\python27\lib\site-packages\wx-2.8-msw-unicode\wx\wxmsw28uh_core_vc.dll
31212 INFO: Warnings written to C:\Users\user\gui\pyinstaller-dev\app\build\pyi.win32\app\warnapp.txt
31292 INFO: checking PYZ
31292 INFO: rebuilding out00-PYZ.toc because out00-PYZ.pyz is missing
31292 INFO: building PYZ out00-PYZ.toc
38072 INFO: checking PKG
38072 INFO: rebuilding out00-PKG.toc because out00-PKG.pkg is missing
38072 INFO: building PKG out00-PKG.pkg
38134 INFO: checking EXE
38134 INFO: rebuilding out00-EXE.toc because app.exe missing
38134 INFO: building EXE from out00-EXE.toc
38181 INFO: Appending archive to EXE C:\Users\user\gui\pyinstaller-dev\app\build\pyi.win32\app\app.exe
38228 INFO: checking COLLECT
38228 INFO: building COLLECT out00-COLLECT.toc

but still doesn't work
Reply all
Reply to author
Forward
0 new messages