If you are developing modules for Scrapy in Visual Studio and you encounter an error “ModuleNotFoundError: No module named ‘win32api'”, you need to install pypiwin32 package.
To do this follow the following steps:
- Go to you Visual Studio Project and right-click on “Python Environments”
- Click on your Python package references, in my case it says “Python 3.7 (64-bit) (global default)”
- Type pypiwin32
- Click on “Run command: pip Install pypiwin32”, when the pypiwin32 (223) with a green package icon on the left shows up, it means the package was successfully installed
- Click on “Install pypiwin32”
- That should do it.
If you are not using Visual Studio, just go to your comman prompt with admin privileges and type “pip install pypiwin32”