Skip to content

import win32api fails after pip install pywin32 (ImportError: DLL load failed: The specified module could not be found) #1399

@theonewolf

Description

@theonewolf

Expected behavior and actual behavior.

Expected import win32api to work without any exception.

Steps to reproduce the problem.

Below I am working in a virtualenv; however, this same problem occurs when I install not inside a venv (I just solved it for my system, so it's easier to illustrate inside a venv now).

pip install pywin32
python -c "import win32api"

With more verbosity, my steps look like:

(pywin32test) C:\Users\WolfgangRichter\Desktop>pip install pywin32
Collecting pywin32
  Using cached https://files.pythonhosted.org/packages/a3/8a/eada1e7990202cd27e58eca2a278c344fef190759bbdc8f8f0eb6abeca9c/pywin32-224-cp37-cp37m-win_amd64.whl
Installing collected packages: pywin32
Successfully installed pywin32-224


(pywin32test) C:\Users\WolfgangRichter\Desktop>python -c "import win32api"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.

Version of Python and pywin32

Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:13:57) [MSC v.1916 64 bit (AMD64)] on win32

pywin32-224-cp37-cp37m-win_amd64.whl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions