在PyCharm的 Terminal(终端)切换Python版本的方法
作者:PininQ 时间:2021-10-31 08:37:07
在我的电脑中存在多个版本的Python,实际工作中也时常需要切换Python版本来进行相关工作。在Pycharm的终端中使用python和ipython命令进入的python shell都是环境变量中,也就是默认的python版本。
每次在 PyCharm 软件中 Terminal 窗口 或者 在cmd 命令行界面中 ,执行 python 命令,启动的都是 python3 的交互界面:
在 PyCharm 软件中 Terminal 窗口 中,输入python优先进入环境变量中的python3.6环境
在 cmd 命令行界面 中,输入python优先进入环境变量中的python3.6环境
这个时候切换python版本的做法就是使用该环境所在路径的绝对路径进行python版本的切换。
E:/Anaconda3/envs/flask_py2/python.exe
在 PyCharm 软件中 Terminal 窗口 中,使用绝对路径进入python2.7环境。
总结:
切换到自己的python环境所在目录后,在控制台执行python时,优先进入当前目录下的python环境,也可以使用 绝对路径 进入某一Python环境。
来源:https://blog.csdn.net/qq_34081993/article/details/80330793
标签:PyCharm,Terminal,切换,Python
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python如何生成随机高斯模糊图片详解
2021-08-25 13:07:18
![](https://img.aspxhome.com/file/2023/1/107061_0s.png)
Python Pandas中根据列的值选取多行数据
2023-02-16 04:17:59
用户体验设计答疑对话(半吊子和纯外行)
2010-11-30 21:27:00
![](https://img.aspxhome.com/file/UploadPic/201011/30/p1030884-13s.jpg)
python实现一个围棋小游戏
2022-02-02 18:52:50
![](https://img.aspxhome.com/file/2023/6/90536_0s.png)
Django框架基础模板标签与filter使用方法详解
2022-10-25 18:14:43
![](https://img.aspxhome.com/file/2023/5/66295_0s.png)
python 实现按对象传值
2023-05-26 14:20:18
![](https://img.aspxhome.com/file/2023/7/101637_0s.jpg)
Python线性表种的单链表详解
2022-03-02 07:36:58
![](https://img.aspxhome.com/file/2023/4/90694_0s.png)
python中Apriori算法实现讲解
2023-10-27 17:41:20
![](https://img.aspxhome.com/file/2023/2/87712_0s.png)
带你轻松了解 SQL Server数据库的组成
2009-02-05 15:53:00
python jinja2模板的使用示例
2023-08-11 05:12:12
python 模拟银行转账功能过程详解
2021-07-16 02:49:15
![](https://img.aspxhome.com/file/2023/5/68295_0s.png)
GetPageSize和GetPageScroll:获取页面大小、窗口大小和滚动条位置
2008-12-27 22:30:00
python实现的文件夹清理程序分享
2021-07-20 07:58:57
python itchat实现微信好友头像拼接图的示例代码
2021-04-12 18:14:56
![](https://img.aspxhome.com/file/2023/2/101482_0s.jpg)
Python学习之迭代器详解
2022-09-02 12:45:45
![](https://img.aspxhome.com/file/2023/7/95567_0s.jpg)
XML与HTML的结合(上)
2008-09-05 17:19:00
详解python中的defaultdict 默认值
2022-12-27 08:51:40
![](https://img.aspxhome.com/file/2023/3/89123_0s.png)
Windows下python3.7安装教程
2023-02-16 16:39:11
![](https://img.aspxhome.com/file/2023/5/90435_0s.png)
微信小程序地图(map)组件点击(tap)获取经纬度的方法
2023-09-03 21:33:37
![](https://img.aspxhome.com/file/2023/6/56196_0s.gif)
CSS Hacks
2008-07-20 13:04:00