1
我正在使用Python 3.6。我已經通過命令ImportError:在Python 3.6中沒有名爲comtypes的模塊
python -m pip install comtypes
Requirement already satisfied: comtypes in c:\users\singtech\appdata\local\programs\python\python36-32\lib\site-packages
安裝模塊comtypes
但我仍然得到導入錯誤從我的腳本comtypes:
import comtypes.client as cc
import comtypes
mylib = cc.GetModule("d:\\path\\to\\mylib.dll")
print(mylib)
當我運行該腳本,它產生以下錯誤:
Traceback (most recent call last):
File "D:\python-apps\aos.py", line 1, in <module>
import comtypes.client as cc
ImportError: No module named 'comtypes'
如何執行腳本? –
我在[Thonny IDE]中運行腳本(http://thonny.org/) – Sithu
您已經將軟件包安裝在用於運行腳本的其他解釋器中。 –