2

I am trying to install pywin32 in a Python 3.9 x64 embedded environment (on Windows 10). Installation works, but import fails.

Steps to reproduce:


mkdir embed
unzip python-3.9.0-embed-amd64.zip embed
python -m pip install --target embed pywin32

cd embed
python
import win32api

1 Answer 1

3

Installing the library to a different path helps:


mkdir embed
unzip python-3.9.0-embed-amd64.zip embed
python -m pip install --target embed\lib\site-packages pywin32

cd embed
python
import site
site.addsitedir("lib/site-packages")

import win32api

I have an open issue for this: https://github.com/mhammond/pywin32/issues/1618

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.