我对keras有一个问题;我只安装过一次,但是由于最近安装了一些其他软件包,所以我无法再导入它。如果我想导入keras,我会得到以下错误(以及许多其他警告等):
ModuleNotFoundError: No module named 'tensorflow.tsl'我试图强制重新安装keras和tensorflow,但是如果我想用keras (命令pip install --force-reinstall keras)来实现这一点,我会得到以下错误
This behaviour is the source of the following dependency conflicts.
tensorflow 2.7.0 requires flatbuffers<3.0,>=1.12, but you have flatbuffers 22.11.23 which is incompatible.
tensorflow 2.7.0 requires keras<2.8,>=2.7.0rc0, but you have keras 2.11.0 which is incompatible.
tensorflow 2.7.0 requires tensorflow-estimator<2.8,~=2.7.0rc0, but you have tensorflow-estimator 2.11.0 which is incompatible.如果我想强制重新安装tensorflow,我会得到以下错误
Could not install packages due to an OSError: [WinError 5] Zugriff verweigert: 'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-uninstall-tbtwxjcv\\core\\_multiarray_tests.cp38-win_amd64.pyd'
Consider using the `--user` option or check the permissions.我真的不知道这里发生了什么;是否可以手动删除软件包,然后重新安装它们?而且简单的pip uninstall不起作用..。最初,我在没有虚拟环境的情况下安装了keras,即只使用了“`pip install keras”,但是它至少工作了一次.
发布于 2022-12-01 10:58:54
您需要升级Tensorflow或降低keras的等级
pip install keras==2.8对其他两个库也这样做
https://stackoverflow.com/questions/74640526
复制相似问题