Skip to main content
 首页 » 编程设计

python之anaconda环境无法卸载包

2025年02月15日9落叶无声

我目前在预制的 conda 环境中安装了 tensorflow 和 tensorflow-gpu。我想删除 tensorflow 但每当我使用

conda remove --name carnd-term1 tensorflow 

我收到以下错误信息

Fetching package metadata ........... 
Solving package specifications: . 
 
 
PackageNotFoundError: Package not found: Conda could not find ' 

为什么我无法删除包?

请您参考如下方法:

你确定你是否使用 conda 来安装 tensorflow 因为无论你使用 conda 安装什么包都会在 ~/anaconda 下所以如果你得到错误那么它意味着它安装在其他路径中,因此 print sys.path 从那里您可以知道 python 查找库的路径,您可以通过查看这些路径手动删除包。据我所知,如果你使用过 conda 那么包应该在 ~/anaconda 如果你使用 pip/pip3 包将在相应的 python 目录。