如何在venv中使用Pywin32?

2024-10-03 21:28:52 发布

您现在位置:Python中文网/ 问答频道 /正文

安装了python3.7.2。在Win32gui中,venv不起作用。你知道吗

当我使用不带venv的Python时: python win32上的Python 3.7.2(tags/v3.7.2:9a3ffc0492018年12月23日,23:09:28)[MSC v.1916 64位(AMD64)] 键入“help”、“copyright”、“credits”或“license”以获取更多信息。你知道吗

import win32gui

Without error. When I use Python with venv: (GameTest) D:\GameTest\Scripts>python Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. import win32gui Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'win32gui'

我怎样才能解决我的问题?你知道吗


Tags: import信息键入venvlicensetagshelpamd64