简体   繁体   English

如何将 python 路径从 anaconda 更改为默认值

[英]How to change python path from anaconda to default

I installed Anaconda and now there's a (base) before the shell username in the terminal.我安装了 Anaconda 现在在终端中的 shell 用户名之前有一个(基础)。 I am also not able to use the default python by python command in the terminal as it calls the anaconda python.我也无法在终端中通过 python 命令使用默认的 python,因为它调用了 anaconda Z23EEEB4347BDD755DDZA。 Also can't switch the python interpreter in vs code.也无法在 vs 代码中切换 python 解释器。 (Nothing happens when I try)Any way I can reset it back. (当我尝试时没有任何反应)任何方式我都可以重置它。 I have python 3.8.2 as default in my Linux fedora os.我在我的 Linux fedora 操作系统中默认使用 python 3.8.2。

Thank You谢谢你

You can go to your bashrc你可以 go 到你的 bashrc

/etc/bashrc

and add a new alias for your default python location which you'll use for calling default python.并为您的默认 python 位置添加一个新别名,您将使用它来调用默认 python。

alias python_default='.../bin/python3'
alias python_conda='.../bin/python3'

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

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