## Error Message
>>> import tensorflow as tf
Traceback (most recent call last):
File "/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/__init__.py", line 22, in <module>
from . import multiarray
File "/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/multiarray.py", line 12, in <module>
from . import overrides
File "/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ImportError: dlopen(/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so, 0x0002): Library not loaded: @rpath/libcblas.3.dylib
Referenced from: /Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so
Reason: tried: '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/../../../../libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/../../../../libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/bin/../lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/bin/../lib/libcblas.3.dylib' (no such file), '/usr/local/lib/libcblas.3.dylib' (no such file), '/usr/lib/libcblas.3.dylib' (no such file)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/tensorflow/__init__.py", line 41, in <module>
from tensorflow.python.tools import module_util as _module_util
File "/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/tensorflow/python/__init__.py", line 41, in <module>
from tensorflow.python.eager import context
File "/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/tensorflow/python/eager/context.py", line 30, in <module>
import numpy as np
File "/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/__init__.py", line 140, in <module>
from . import core
File "/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/__init__.py", line 48, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.9 from "/Users/sungmin/miniforge3/envs/tf/bin/python"
* The NumPy version is: "1.19.5"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: dlopen(/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so, 0x0002): Library not loaded: @rpath/libcblas.3.dylib
Referenced from: /Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-darwin.so
Reason: tried: '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/../../../../libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/core/../../../../libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/bin/../lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/lib/libcblas.3.dylib' (no such file), '/Users/sungmin/miniforge3/envs/tf/bin/../lib/libcblas.3.dylib' (no such file), '/usr/local/lib/libcblas.3.dylib' (no such file), '/usr/lib/libcblas.3.dylib' (no such file)
## Fix Error
(tf) sungmin@sungminyunui-MacBookPro test1 % pip uninstall numpy
Found existing installation: numpy 1.19.5
Uninstalling numpy-1.19.5:
Would remove:
/Users/sungmin/miniforge3/envs/tf/bin/f2py
/Users/sungmin/miniforge3/envs/tf/bin/f2py3
/Users/sungmin/miniforge3/envs/tf/bin/f2py3.9
/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy-1.19.5.dist-info/*
/Users/sungmin/miniforge3/envs/tf/lib/python3.9/site-packages/numpy/*
Proceed (Y/n)? y
Successfully uninstalled numpy-1.19.5
(tf) sungmin@sungminyunui-MacBookPro test1 % pip install numpy
Collecting numpy
Downloading numpy-1.22.1-cp39-cp39-macosx_11_0_arm64.whl (12.8 MB)
|████████████████████████████████| 12.8 MB 6.8 MB/s
Installing collected packages: numpy
Successfully installed numpy-1.22.1
(tf) sungmin@sungminyunui-MacBookPro test1 % python
Python 3.9.0 | packaged by conda-forge | (default, Nov 26 2020, 07:55:15)
[Clang 11.0.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> tf.__version__
'2.7.0'
>>>
댓글
댓글 쓰기