| | |
py2exe paths
![]() |
•
•
Join Date: Sep 2009
Posts: 4
Reputation:
Solved Threads: 0
when using the data_files option in my setup.py
[/code]
#!/usr/bin/env python
import ctypes
from OpenGL.platform import win32
from distutils.core import setup
import py2exe
import sys
sys.path.append("dist")
setup(options = {"py2exe": {"compressed": 1,
"optimize": 2,
"includes": ["ctypes","Tkinter","Numeric"],
"excludes": ["OpenGL"]
}},
zipfile = None,
data_files=['msvcr71.dll', glut32.dll'],
windows=['myprogram.py']
)
[/code]
I get an error saying msvcr71.dll is not found. It exists in C:\windows\system32. If I specify its full path then I get a similar message about glut32.dll. That one exists in the python site libs. If I include it I get an executable but it doesn't work. I wonder though, whether py2exe can find those dll's to link to them properly in the first place so come to this question: what path variables apply to py2exe? Both directories in question are in my PATH and PythonPath environment variables.
--Douglas
[/code]
#!/usr/bin/env python
import ctypes
from OpenGL.platform import win32
from distutils.core import setup
import py2exe
import sys
sys.path.append("dist")
setup(options = {"py2exe": {"compressed": 1,
"optimize": 2,
"includes": ["ctypes","Tkinter","Numeric"],
"excludes": ["OpenGL"]
}},
zipfile = None,
data_files=['msvcr71.dll', glut32.dll'],
windows=['myprogram.py']
)
[/code]
I get an error saying msvcr71.dll is not found. It exists in C:\windows\system32. If I specify its full path then I get a similar message about glut32.dll. That one exists in the python site libs. If I include it I get an executable but it doesn't work. I wonder though, whether py2exe can find those dll's to link to them properly in the first place so come to this question: what path variables apply to py2exe? Both directories in question are in my PATH and PythonPath environment variables.
--Douglas
•
•
Join Date: Sep 2009
Posts: 4
Reputation:
Solved Threads: 0
•
•
•
•
I can't find the examples right now, but I recall modifying the setup.py to perform a search for some DLLs and using the path I found in the data section.
so instead of the constant string'msvcr71.dll'you would use a string variable which contains the full path (as built by the search code).
from ctypes import utils
wasn't in my script. That lets py2exe realize it needs to include that package since deep in pyOpenGL it includes that in a conditional branch.
![]() |
Similar Threads
- py2exe fails with pyOpenGL 3.0.1a2 (Python)
- Error 'not all code paths return a value' (C#)
- need a help regarding "setup" in pyton using py2exe (Python)
- Document Root paths and circles (Search Engine Optimization)
- wxpython and py2exe (Python)
- Py2exe and Jython - Please help me! (Python)
- Py2exe help (Python)
Other Threads in the Python Forum
- Previous Thread: Please Help!
- Next Thread: Unsupported Operand Types?
| Thread Tools | Search this Thread |
address advanced ajax anti arax array backend beginner bluetooth c# c++ calculator calling code convert curved cx-freeze def dictionary digital dynamic edit event examples excel exe file format function google gui halp http images input itunes jaunty java keycontrol launcher library line linux list lists loop maze mouse movingimageswithpygame newb opensource output parameters path prime process programming projects push py2exe pygame pyglet pygtk pyqt python random raw_input recursive regex remote return reverse ruby shebang skinning software source sprite sqlite string sudokusolver sum syntax table text threading time tkinter tooltip tutorial ubuntu unicode url urllib urllib2 variable ventrilo whileloop wikipedia wxpython






