English 中文(简体)
ImportError: 不能进口名称——cbetback_c from scipy._lib
原标题:ImportError: cannot import name _ccallback_c from scipy._lib

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)

当Im试图安装帐篷-2.3.0-cp37-none-linux_aarch64.whl时,该机又转回头去, 1.41。

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)

此外,还设法改进了 s-1.5.3。 仍有同样的错误。

增 编

最佳回答

安装管道后,

pip uninstall scipy 

报刊编号,在完成之后,类型:

pip install scipy

傲慢:

"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"

但是, 我的实际错误得到解决。

ImportError: cannot import name  _ccallback_c  from  scipy._lib  (/usr/lib/python3.7/site-packages/scipy/_lib/__init__.py)
问题回答

暂无回答




相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签