개발

Importing the numpy c-extensions failed Error | 주피터 노트북 넘파이 임포트 에러

콘2조아 2022. 3. 25. 15:50
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed. This error can happen for
different reasons, often due to issues with your setup.

맥북에서 쥬피터 노트북을 깔고 numpy 를 import 하려고 했을 때 이런 오류가 발생했다. 분명 numpy는 설치되어 있는데 이런 오류가 떴다. 정확한 이유는 모르겠지만, 아마도 넘파이의 버전이 잘못되서 이런 오류가 발생하지 않았나 싶다.

 

해결은 이렇게 했다. 터미널을 켜고 다음 명령어를 차례로 한 줄씩 입력해준다. 

 

pip uninstall -y numpy

pip uninstall -y setuptools

pip install setuptools

pip install numpy

 

삭제후 재설치를 하고 쥬피터 노트북을 다시 켜서 import numpy를 치면 에러 메세지가 나타나지 않는다.

 

참고:

https://stackoverflow.com/questions/58868528/importing-the-numpy-c-extensions-failed

 

Importing the numpy c-extensions failed

Importing the numpy c-extensions failed I installed python 3.7 on my windows system to work on visual studio code. Everything was going well, including using the libraries. I uninstalled python us...

stackoverflow.com