Embedded Python application don't work if Python is installed

Miki Tebeka miki.tebeka at zoran.com
Mon Jul 5 23:15:13 CEST 2004


Hello All,

I have a funny problem:

An embedded python application is working fine on a "clean" computer.
When it runs on a computer with python installed (the very same computer
used to produce the application) it has a import error:
----------
can't import SACD module (sacd.py)
Error in sys.exitfunc:
Traceback (most recent call last):
  File "atexit.pyc", line 20, in _run_exitfuncs
  File "threading.pyc", line 566, in __exitfunc
  File "threading.pyc", line 578, in _pickSomeNonDaemonThread
  File "c:\ADP86Tools\bin\sacd.py", line 44, in ?
    filterwarnings("ignore", category=FutureWarning)
  File "warnings.pyc", line 140, in filterwarnings
  File "re.pyc", line 5, in ?
  File "sre.pyc", line 97, in ?
  File "sre_compile.pyc", line 13, in ?
  File "_sre.pyc", line 9, in ?
  File "_sre.pyc", line 7, in __load
ImportError: DLL load failed: The specified module could not be found.
----------
(The traceback is printed from the embedding application)

All the required modules are in a library (python23.zip) and placed
the needed dll's in the same directory as the application (it's in
sys.path).
The script itself is a regular python file (.py), dependencies were found
using py2exe.

OS is win2k and Python is 2.3.4.

I've tried editing sys.path to contain only the application directory and
the library zip and also to add the application directory to PATH
environment variables. Nothing helps.

The offending module is re. Writing
import re
re.compile("\s+")
will cause the same problem.

Any ideas?

Bye.
--
------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at zoran.com>
http://tebeka.spymac.net
The only difference between children and adults is the price of the toys



More information about the Python-list mailing list