无法卸载Tensorflow-文件夹仍保留在dist软件包中

问题描述 投票:1回答:1

我使用sudo pip3.6 install tensorflow==1.7安装了tensorflow(我已经有了tensorflow 1.6,但想升级),但是我无法卸载它。我尝试了sudo pip3.6 uninstall tensorflow,它说tensorflow已成功卸载,但我认为那不是真的。当我尝试运行tensorflow python代码时出现以下错误(理想情况下应该说我猜是导入错误)

AttributeError:模块'tensorflow.python.training.checkpointable'没有属性'CheckpointableBase']

再次使用sudo pip3.6 uninstall tensorflow仅显示

跳过未安装的tensorflow。

我环顾了一下,在usr/local/lib/python3.6/dist-packages/中发现了以下文件夹

  • 张量板
  • tensorboard-1.7.0.dist-info
  • tensorflow
  • tensorflow_datasets
  • tensorflow_datasets-1.3.2.dist-info
  • tensorflow_estimator
  • tensorflow_estimator-1.13.0.dist-info
  • tensorflow_metadata
  • tensorflow_metadata-0.21.0.dist-info
  • tensorflow_tensorboard-0.4.0.dist-info

似乎是一团糟。我可以继续删除这些文件夹吗?删除这些错误的正确方法是什么?

python tensorflow ubuntu-16.04 uninstall tensorflow-estimator
1个回答
0
投票

是,您需要手动将其删除,可以按照以下步骤进行操作。

  • 转到您的案例usr/local/lib/python3.6/dist-packages/中pip安装软件包的site-packages目录。
  • 您应该看到与您要卸载的软件包相对应的文件。删除您的案例rm -rf tensor*的文件。

  • 安装所需的Tensorflow版本pip install tensorflow==1.7

我希望这能解决您的问题。

© www.soinside.com 2019 - 2024. All rights reserved.