pip install cx_oracle 오류 Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools" 파이썬 오라클 DB연결 과정 오류 해결법
파이썬에서 오라클 DB에 연결하기 위해
pip install cx_oracle를 아나콘다 프롬프트에서 실행하는 과정에서
Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio"
visualstudio.microsoft.com/ko/downloads/
해당 오류가 발생
읽어보면 visual c++ 14.0 버전 이상이 필요하다는 걸 알 수 있다.
해결법은,
https://stackoverflow.com/questions/44951456/pip-error-microsoft-visual-c-14-0-is-required
Pip error: Microsoft Visual C++ 14.0 is required
I just ran the following command: pip install -U steem and the installation worked well until it failed to install pycrypto. Afterwards I did the pip install cryptography command because I though...
stackoverflow.com
이 링크를 참고했다.
1.https://visualstudio.microsoft.com/ko/visual-cpp-build-tools/
Microsoft C++ Build Tools - Visual Studio
visualstudio.microsoft.com
여기서 buildTools exe프로그램 다운해서 실행하면
visual studio installer가 깔린다.
2. visual studio installer에 들어간다
나는 2019 사용중이라 2019에 있는 수정(M)버튼을 클릭했다.
그러면 로딩이 잠시 걸리고
3. C++를 사용한 데스크톱 개발 다운로드
이런 창이 뜰텐데, 노란 형광펜 칠한 C++를 사용한 데스크톱 개발에 체크해주고 오른쪽 하단의 수정버튼을 눌러주면 다운로드 된다. 참고로 캡처화면은 설치 후 사진이다.
4. 그 다음에는 시간이 좀 걸려서 설치되고, 다시 아나콘다 프롬프트에서 pip install cx_oracle하면 잘 된다.
5. 혹시 이래도 안된다면, 아나콘다 프롬프트를 관리자 권한으로 실행해보거나
오라클 instant client와 오라클 database를 버전 맞게 설치후, 환경 변수까지 완료한 상태인지 확인해보자
느낀점: 로그를 잘 읽자
oracle이 C++도구랑 관련이 있는지 몰랐다. 중간에 전달하는 모듈에 C++이 사용된걸까?