아나콘다 설치후
pip install tensorflow 로 아나콘다 설치 후 코드를 돌렸을 때 다음과 같은 에러가 뜬다면,
아나콘다와 tensorflow의 버전이 안맞아서 그런것임.
ImportError Traceback (most recent call last)
ImportError: No module named 'numpy.core._multiarray_umath'
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
ImportError: numpy.core.multiarray failed to import
During handling of the above exception, another exception occurred:
SystemError Traceback (most recent call last)
~\AppData\Local\conda\conda\envs\python35\lib\importlib\_bootstrap.py in _find_and_load(name, import_)
SystemError: PyEval_EvalFrameEx returned a result with an error set
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
ImportError: numpy.core._multiarray_umath failed to import
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
ImportError: numpy.core.umath failed to import
pip uninstall tensorflow : 기존 텐서플로우 삭제
pip install tensorflow==1.12.0 : 현재 자신의 파이썬과 매칭되는 텐서플로우 설치
대부분의 사람들이 python 3.5.x버전을 까는것도 tensorflow 버전때문인데...
암튼 이런 오류가 뜬다면 그냥 버전 매칭만 시켜주면됨.
결론적으로는 아나콘다 깔고 깔린 파이썬 버전과 텐서플로우 버전만 맞게 설치하면 끝.
<내가 아는 매칭되는 버전>
anaconda 5.3.0이전 버전 (자동으로 python 3.6 버전 설치) - tensorflow 1.12.0
anaconda 5.3.0 (python 3.7) - tensorflow 1.13.0
댓글 없음:
댓글 쓰기