반응형

안녕하세요

오늘은 파이썬 에러 해결방법을 가지고 왔습니다. 

아래와 같이 발생하는 경우는 보통 파이썬을 수동 설치할때 발생해요!!

 


 

저도 여러가지 방법을 찾아가며 해보았는데요 

아래와 같이 하면 바로 해결이 되요!

 


 

먼저 스크립트 디렉토리 pywin32_postinstall.py에서 스크립트를 실행해야 합니다. 

Python 디렉토리가 C:\python3이라고 가정해보자. 아래의 코드를 따라해주세요

cd C:\python3
python Scripts/pywin32_postinstall.py -install

 

그런 다음 설치 시 C:\Windows\System32 아래에 DLL 파일이 생성됩니다.

이 두 파일(pythoncom310.dll 및 pywintypes310.dll)을 C:\python3\Lib\site-packages\win32 디렉토리로 이동해야 합니다.

 

이후 

python310._pth 파일을 수정해줘야 하는데 해당 파일에 위 경로를 적어주면 해결 됩니다.

Lib/site-packages
Lib/site-packages/win32
Lib/site-packages/win32/lib
Lib/site-packages/pythonwin
python310.zip
.

# Uncomment to run site.main() automatically
#import site

출처: https://codefaq.org/windows/python/how-to-fix-modulenotfounderror-no-module-named-win32api-in-python/

https://stackoverflow.com/questions/32639074/why-am-i-getting-importerror-no-module-named-pip-right-after-installing-pip

반응형

+ Recent posts