Python – FileNotFoundError for pysvn in calling exe compiled with py2exe

  py2exe, pysvn, python, setup.py

setup.py for py2exe:

setup(console=['TagProject.py'], options={'py2exe':{'dist_dir':'AriesTools'} } )

When I called the exe, I got the error:

Traceback (most recent call last):
  File "TagProject.py", line 7, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "pysvn__init__.pyc", line 116, in <module>
  File "os.pyc", line 1111, in add_dll_directory
FileNotFoundError: [WinError 3] The system cannot find the path specified: 
'H:PythonScriptsAriesToolslibrary.zippysvn'

Installed components:

Python 3.9.6 (32-bit)
Python 3.9 PySVN 1.9.13-2056 on Win32
py2exe-0.10.4.0-cp39-cp39-win32.whl

I used the same process to create exe for other scripts which do not use pysvn, and the exe did not show the same problem.

Source: Python Questions

LEAVE A COMMENT