简体   繁体   English

两个版本的 python 安装在两个地方

[英]two versions of python installed at two places

I had uninstalled python 3.8 from my system and installed 3.7.x But after running the command where python and where python3 in the cmd I get two different locations.我已经从我的系统中卸载了 python 3.8 并安装了 3.7.x 但是在运行where pythonwhere python3在 cmd 中的命令后,我得到了两个不同的位置。 I was facing issues regarding having two versions of python.我遇到了关于拥有两个版本的 python 的问题。 So I would like to know how i can completely remove python3 located files.所以我想知道如何完全删除位于 python3 的文件。

To delete a specific python version, you can use which python and remove the python folder using sudo rm -rf <path returned from the above command> .要删除特定的 python 版本,您可以使用which python并使用sudo rm -rf <path returned from the above command>删除 python 文件夹。 You might also have to modify the PATH env variable to the location which contains the python executables of the version you want.您可能还必须将 PATH 环境变量修改为包含所需版本的 python 可执行文件的位置。

Or you can install Anaconda [https://www.anaconda.com/products/individual] which helps to manage multiple versions of python for you.或者您可以安装 Anaconda [https://www.anaconda.com/products/individual] 这有助于为您管理 python 的多个版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM