You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With pywin32 build 219 installed via conda on python 2.7, importing pythoncom fails with
ImportError: No system module 'pywintypes' (pywintypes27.dll)
The issue is that the library pywintypes27.dll is stored not in
pathtovenv\lib\site-packages\win32\lib\pywintypes27.dll
but in
pathtovenv\lib\site-packages\win32\pywintypes27.dll
Adding in the file win32\lib\pywintypes.py the elif part herebelow solves the issue
:::python
if found is None:
# Not in the Python directory? Maybe we were installed via
# easy_install...
if os.path.isfile(os.path.join(os.path.dirname(__file__), filename)):
found = os.path.join(os.path.dirname(__file__), filename)
elif os.path.isfile(os.path.join(os.path.dirname(__file__), "..", filename)):
found = os.path.join(os.path.dirname(__file__), "..", filename)
Paths and services issues are replicated in many other issues with more details. Like in #1455 (comment), #1399 and #1865 (and many old closed issues with less details)
With pywin32 build 219 installed via conda on python 2.7, importing pythoncom fails with
ImportError: No system module 'pywintypes' (pywintypes27.dll)
The issue is that the library pywintypes27.dll is stored not in
pathtovenv\lib\site-packages\win32\lib\pywintypes27.dll
but in
pathtovenv\lib\site-packages\win32\pywintypes27.dll
Adding in the file win32\lib\pywintypes.py the elif part herebelow solves the issue
:::python
Reported by: sdementen
Original Ticket: pywin32/bugs/685
The text was updated successfully, but these errors were encountered: