갈루아의 반서재

윈도우 10 + 아나콘다 가상환경 + 파이썬 3.8 + 텐서플로 2.4 환경에서 다음과 같이 텐서플로 임포트시 런타임 에러 발생하는 경우

 

RuntimeError: The current Numpy installation fails to pass a sanity check due to a bug in the windows runtime

>>> import tensorflow as tf
2020-12-28 17:01:14.540219: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2020-12-28 17:01:14.540624: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
 ** On entry to DGEBAL parameter number  3 had an illegal value
 ** On entry to DGEHRD  parameter number  2 had an illegal value
 ** On entry to DORGHR DORGQR parameter number  2 had an illegal value
 ** On entry to DHSEQR parameter number  4 had an illegal value
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\pluto\anaconda3\envs\logi\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "C:\Users\pluto\anaconda3\envs\logi\lib\site-packages\tensorflow\python\__init__.py", line 41, in <module>
    from tensorflow.python.eager import context
  File "C:\Users\pluto\anaconda3\envs\logi\lib\site-packages\tensorflow\python\eager\context.py", line 29, in <module>
    import numpy as np
  File "C:\Users\pluto\anaconda3\envs\logi\lib\site-packages\numpy\__init__.py", line 305, in <module>
    _win_os_check()
  File "C:\Users\pluto\anaconda3\envs\logi\lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
    raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\\Users\\pluto\\anaconda3\\envs\\logi\\lib\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86

 

해당 이슈는 여기에서 보듯이 2021년 1월경 수정 가능할 것으로 예상되며, 현재 시점에서 임시로 조치할 수 있는 방법은 아래와 같이 numpy 1.19.3 버전으로 지정해서 설치하는 것이다. 

(logi) C:\Users\pluto>pip install numpy==1.19.3
Collecting numpy==1.19.3
  Downloading numpy-1.19.3-cp38-cp38-win_amd64.whl (13.3 MB)
     |████████████████████████████████| 13.3 MB 6.4 MB/s
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 1.19.4
    Uninstalling numpy-1.19.4:
      Successfully uninstalled numpy-1.19.4
Successfully installed numpy-1.19.3