Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: pywintypes cannot find files in certain directory #2

Closed
mikkkee opened this issue Jul 20, 2015 · 0 comments
Closed

Bug: pywintypes cannot find files in certain directory #2

mikkkee opened this issue Jul 20, 2015 · 0 comments
Assignees
Labels

Comments

@mikkkee
Copy link
Owner

mikkkee commented Jul 20, 2015

There may be ImportError in pythoncom and IOError in PyInstaller if you are using Anaconda Python.

Traceback (most recent call last):
  File "<string>", line 11, in <module>
  File "C:\Anaconda\lib\site-packages\pythoncom.py", line 3, in <module>
    pywintypes.__import_pywin32_system_module__("pythoncom", globals())
  File "C:\Anaconda\lib\site-packages\win32\lib\pywintypes.py", line 98, in __import_pywin32_system_module__
    raise ImportError("No system module '%s' (%s)" % (modname, filename))
ImportError: No system module 'pythoncom' (pythoncom27.dll)
Traceback (most recent call last):
  File "C:\Anaconda\Scripts\pyinstaller-script.py", line 9, in <module>
    load_entry_point('PyInstaller==2.1', 'console_scripts', 'pyinstaller')()
  File "C:\Anaconda\lib\site-packages\PyInstaller\main.py", line 88, in run
    run_build(opts, spec_file, pyi_config)
  File "C:\Anaconda\lib\site-packages\PyInstaller\main.py", line 46, in run_build
    PyInstaller.build.main(pyi_config, spec_file, **opts.__dict__)
  File "C:\Anaconda\lib\site-packages\PyInstaller\build.py", line 1924, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "C:\Anaconda\lib\site-packages\PyInstaller\build.py", line 1873, in build
    execfile(spec)
  File "build.spec", line 34, in <module>
    icon='images\\logo_tray.ico')
  File "C:\Anaconda\lib\site-packages\PyInstaller\build.py", line 1170, in __init__
    strip_binaries=self.strip, upx_binaries=self.upx,
  File "C:\Anaconda\lib\site-packages\PyInstaller\build.py", line 1008, in __init__
    self.__postinit__()
  File "C:\Anaconda\lib\site-packages\PyInstaller\build.py", line 309, in __postinit__
    self.assemble()
  File "C:\Anaconda\lib\site-packages\PyInstaller\build.py", line 1050, in assemble
    dist_nm=inm)
  File "C:\Anaconda\lib\site-packages\PyInstaller\build.py", line 842, in checkCache
    digest = cacheDigest(fnm)
  File "C:\Anaconda\lib\site-packages\PyInstaller\build.py", line 796, in cacheDigest
    data = open(fnm, "rb").read()
IOError: [Errno 22] invalid mode ('rb') or filename: ''

Need to copy pywintypes27.dll, and pythoncom27.dll sitting in C:\<Python-Path>\Lib\site-packages\win32 to C:\<Python-Path>\Lib\site-packages\win32\lib

Ref: py2exe - No system module 'pywintypes'

@mikkkee mikkkee added the bug label Jul 20, 2015
@mikkkee mikkkee self-assigned this Jul 20, 2015
@mikkkee mikkkee closed this as completed May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant