AI/Machine Learning, Deep Learning

TensorFlow-gpu 2.10.0 - CUDA 11.2 - cuDNN 8.1 numpy error

강서버 2025. 7. 3. 01:24
반응형

[ Error Message ]

C:\devel\tf> python c:/devel/tf/cuda_test.py

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

(... Log omitted ...)

 

 

[ Solution ]

> pip install numpy==1.26.4
or
> pip install "numpy<2.0" 

 

[ Log ]

C:\Users\user>pip install "numpy<2.0"
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting numpy<2.0
  Downloading numpy-1.26.4-cp39-cp39-win_amd64.whl.metadata (61 kB)
Downloading numpy-1.26.4-cp39-cp39-win_amd64.whl (15.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.8/15.8 MB 10.4 MB/s eta 0:00:00
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 2.0.2
    Uninstalling numpy-2.0.2:
      Successfully uninstalled numpy-2.0.2
Successfully installed numpy-1.26.4

 

 

[ Reference ]

https://stackoverflow.com/questions/78641150/a-module-that-was-compiled-using-numpy-1-x-cannot-be-run-in-numpy-2-0-0

 

 

728x90
반응형