[py2exe] How can I specify additional module search paths

Ruediger Maehl ruediger.maehl_nospam at web.de
Thu Jan 31 03:15:46 EST 2002


Hello,

I have just started to use py2exe (0.2.7) to build an executable,
but some modules cannot be found. This is obvious, because
sys.path gets an additional path during program execution.

How can I include these modules then?
Or better: how must the statement look like?

The socket2file_setup.py:
-----
# socket2file_setup.py
from distutils.core import setup
import py2exe

setup(  name="socket2file",
        scripts = ["socket2file.py"],
        data_files = [  (".", ["socket2file.bat", "socket2file.ini"])
                    ]
)
-----
and executing the command outputs:

D:\SIPDAMS\SIPDAMS_Paperless\Socket2File>python socket2file_setup.py
py2exe --includes ..\lib\iso_datetime,..\lib\inifile,..\lib\tee_stream
running py2exe
running build
running build_scripts
not copying socket2file.py (up-to-date)
running install_scripts
not copying build\scripts-2.2\myConfiguration.py (output up-to-date)
not copying build\scripts-2.2\socket2file.py (output up-to-date)
running install_data
not copying socket2file.bat (output up-to-date)
not copying socket2file.ini (output up-to-date)
+----------------------------------------------------
| Processing script socket2file.py with py2exe-0.2.7
+----------------------------------------------------
Copying data files
not copying socket2file.bat (output up-to-date)
not copying socket2file.ini (output up-to-date)
Searching modules needed to run 'socket2file.py' on path:
['D:\\SIPDAMS\\SIPDAMS_Paperless\\Socket2File\\build\\bdist.win32\\winexe\\l
ib\\
Programme\\Python22\\Lib\\site-packages', '',
'C:\\Programme\\Python22\\sapdb',
'D:\\SIPDAMS\\SIPDAMS_Paperless\\Socket2File',
'C:\\Programme\\Python22\\DLLs',
'C:\\Programme\\Python22\\lib', 'C:\\Programme\\Python22\\lib\\lib-tk',
'C:\\Pro
gramme\\Python22', 'C:\\Programme\\Python22\\lib\\site-packages']
error: No such file or directory

The missing modules can be found in the directory:
D:\SIPDAMS\SIPDAMS_Paperless\Lib

Well, what do I have to specify for --includes?

Any help is really appreciated,

Rüdiger





More information about the Python-list mailing list