2017-02-02 6 views
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' 
+0

스크립트를 어떻게 실행합니까? –

+0

[Thonny IDE] (http://thonny.org/)에서 스크립트를 실행합니다 – Sithu

+2

스크립트를 실행하는 데 사용되는 다른 인터프리터에 패키지를 설치했습니다. –

답변

1

필자는 Python 초보자 IDE Thonny에서 스크립트를 실행합니다. 다른 통역사를 사용합니다. IDE의 옵션에서 올바른 인터프리터 경로를 설정하면 가져 오기 오류가 사라집니다.

enter image description here