Issue
I am facing the below errors,
Traceback (most recent call last):
File "face_recognition_pymodule_sklearn.py", line 26, in <module>
from sklearn.preprocessing import LabelEncoder
File "/usr/lib/python3.7/site-packages/sklearn/__init__.py", line 134, in <module>
from .base import clone
File "/usr/lib/python3.7/site-packages/sklearn/base.py", line 11, in <module>
from scipy import sparse
File "/usr/lib/python3.7/site-packages/scipy/__init__.py", line 151, in <module>
from scipy._lib._ccallback import LowLevelCallable
File "/usr/lib/python3.7/site-packages/scipy/_lib/_ccallback.py", line 1, in <module>
from . import _ccallback_c
ImportError: cannot import name '_ccallback_c' from 'scipy._lib' (/usr/lib/python3.7/site-packages/scipy/_lib/__init__.py)
When I'm trying to install the tensorflow-2.3.0-cp37-none-linux_aarch64.whl, during that its switch back to scipy 1.4.1.
pip install tensorflow-2.3.0-cp37-none-linux_aarch64.whl
Requirement already satisfied: tensorflow==2.3.0 from file:///home/root/tensorflow-2.3.0-cp37-none-linux_aarch64.whl in /usr/lib/python3.7/site-packages (2.3.0)
Requirement already satisfied: grpcio>=1.8.6 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (1.33.2)
Requirement already satisfied: tensorflow-estimator<2.4.0,>=2.3.0 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (2.3.0)
Requirement already satisfied: wheel>=0.26 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (0.35.1)
Requirement already satisfied: scipy==1.4.1 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (1.4.1)
Requirement already satisfied: tensorboard<3,>=2.3.0 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (2.3.0)
Requirement already satisfied: h5py<2.11.0,>=2.10.0 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (2.10.0)
Requirement already satisfied: six>=1.12.0 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (1.15.0)
Requirement already satisfied: absl-py>=0.7.0 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (0.7.0)
Requirement already satisfied: opt-einsum>=2.3.2 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (3.3.0)
Requirement already satisfied: gast==0.3.3 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (0.3.3)
Requirement already satisfied: google-pasta>=0.1.8 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (0.2.0)
Requirement already satisfied: protobuf>=3.9.2 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (3.13.0)
Requirement already satisfied: numpy<1.19.0,>=1.16.0 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (1.17.0)
Requirement already satisfied: termcolor>=1.1.0 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (1.1.0)
Requirement already satisfied: astunparse==1.6.3 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (1.6.3)
Requirement already satisfied: wrapt>=1.11.1 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (1.12.1)
Requirement already satisfied: keras-preprocessing<1.2,>=1.1.1 in /usr/lib/python3.7/site-packages (from tensorflow==2.3.0) (1.1.2)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/lib/python3.7/site-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (0.4.2)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/lib/python3.7/site-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (1.7.0)
Requirement already satisfied: setuptools>=41.0.0 in /usr/lib/python3.7/site-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (50.3.2)
Requirement already satisfied: google-auth<2,>=1.6.3 in /usr/lib/python3.7/site-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (1.23.0)
Requirement already satisfied: requests<3,>=2.21.0 in /usr/lib/python3.7/site-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (2.22.0)
Requirement already satisfied: werkzeug>=0.11.15 in /usr/lib/python3.7/site-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (0.14.1)
Requirement already satisfied: markdown>=2.6.8 in /usr/lib/python3.7/site-packages (from tensorboard<3,>=2.3.0->tensorflow==2.3.0) (3.0.1)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/lib/python3.7/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (1.3.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (0.2.8)
Requirement already satisfied: rsa<5,>=3.1.4; python_version >= "3.5" in /usr/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (4.6)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (4.1.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (1.25.6)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (2019.9.11)
Requirement already satisfied: oauthlib>=3.0.0 in /usr/lib/python3.7/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (3.1.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow==2.3.0) (0.4.7)
Also trying with upgraded the scipy-1.5.3 as well. Still getting same error.
Thanks
Solution
After uninstall and install the scipy,
pip uninstall scipy
press y
, and after pip is done, type:
pip install scipy
Error seen:
"unistall and reinstall the scipy "ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts. We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default. tensorflow 2.3.0 requires scipy==1.4.1, but you'll have scipy 1.5.3 which is incompatible"
But, My actual Error was resolved
ImportError: cannot import name '_ccallback_c' from 'scipy._lib' (/usr/lib/python3.7/site-packages/scipy/_lib/__init__.py)
Answered By - Darshak Patel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.