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

Cannot import pywintypes #784

Closed
1 task done
fqwl opened this issue Dec 8, 2021 · 0 comments · Fixed by #785
Closed
1 task done

Cannot import pywintypes #784

fqwl opened this issue Dec 8, 2021 · 0 comments · Fixed by #785
Labels
🐛 bug Something isn't working

Comments

@fqwl
Copy link

fqwl commented Dec 8, 2021

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

Initialize and then add xlwings

pdm init
pdm add xlwings

import xlwings as xw in py file

Actual behavior

Get the error that pywintypes could not be found afterimport xlwings

Traceback (most recent call last):
  File "e:\Code\pdm-test\test.py", line 1, in <module>
    import xlwings as xw
  File "e:\Code\pdm-test\__pypackages__\3.9\lib\xlwings\__init__.py", line 9, in <module>
    from . import _xlwindows as xlplatform
  File "e:\Code\pdm-test\__pypackages__\3.9\lib\xlwings\_xlwindows.py", line 14, in <module>
    import pywintypes
  File "e:\Code\pdm-test\__pypackages__\3.9\lib\win32\lib\pywintypes.py", line 117, in <module>
    __import_pywin32_system_module__("pywintypes", globals())
  File "e:\Code\pdm-test\__pypackages__\3.9\lib\win32\lib\pywintypes.py", line 98, in __import_pywin32_system_module__
    raise ImportError("No system module '%s' (%s)" % (modname, filename))
ImportError: No system module 'pywintypes' (pywintypes39.dll)

Expected behavior

After installing xlwings, can find pywintypes39.dll in __pypackages__\3.9\lib\pywin32_system32\, it should be imported correctly

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:        1.11.0
Python Interpreter: C:/Python39/python.EXE (3.9)
Project Root:       E:/Code/pdm-test
Project Packages:   E:\Code\pdm-test\__pypackages__\3.9
@fqwl fqwl added the 🐛 bug Something isn't working label Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant