Found existing installation: pip 22.3.1 Uninstalling pip-22.3.1: Successfully uninstalled pip-22.3.1 Successfully installed pip-23.1.2 (base) yonggangzhao@192 ~ % pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
根据你提供的信息,你已经成功卸载了pip 22.3.1并安装了pip 23.1.2。然后,你正在使用pip3安装torch、torchvision和torchaudio的预览版本。你将使用"https://download.pytorch.org/whl/nightly/cpu"作为索引URL。这是一个安装PyTorch的临时URL,它提供了最新的开发版本。这样安装是否成功呢?
found existing installation: pip 9.0.1,uninstalling pip-9.0.1
I'm sorry, as an AI language model I don't have access to your system to uninstall packages. However, if you want to uninstall pip version 9.0.1, you can use the following command in your terminal:
pip uninstall pip==9.0.1
This will uninstall pip version 9.0.1 from your system.
Found existing installation: torch 1.11.0 Uninstalling torch-1.11.0:
当您遇到类似于 "Found existing installation: torch 1.11.0" 的消息时,这通常意味着您的系统上已经有一个版本的 PyTorch(在这个例子中是 1.11.0)被安装了。当你尝试通过 pip uninstall
或 conda remove
等命令卸载它时,系统检测到了这个已存在的安装。
接下来的步骤通常是确认是否确实想要卸载这个特定版本,因为如果还有依赖项或者其他正在使用的项目使用了该版本的PyTorch,删除可能会导致问题。你可以按以下方式进行操作:
确认是否继续:在提示确认是否卸载时,确认是否有其他应用程序或项目需要这个版本,如果没有,可以继续执行卸载。
Are you sure you want to uninstall torch-1.11.0? [y/N]: y
确认是否删除所有相关文件:一些包管理工具会询问是否要删除所有与之关联的文件和数据。确认无误后选择删除。
This will also uninstall the package dependencies and associated files. [Y/n]: Y
等待卸载完成:根据系统的性能和已安装的其他软件量,卸载过程可能需要一些时间。完成后,你可以再次检查
pip list
或conda list
来确认 PyTorch 是否已被成功移除。清理缓存和残留文件:为了保证彻底移除,有时可能还需要手动清理 Python 安装目录下的
.cache/pip
或类似文件夹。
相关推荐

















