【发布时间】:2017-08-02 12:03:02
【问题描述】:
我为 python3 项目创建了一个虚拟环境。
phil@shuttle:$ python3 -m venv venv
phil@shuttle:$ source venv/bin/activate
(venv) phil@shuttle:$ python -V
Python 3.5.3
(venv) phil@shuttle:$
但是,当我在其中时,idle 仍然默认为 python 2.7。 idle3 命令工作正常。
我可以在虚拟环境中(而不是在虚拟环境之外)更改 idle 的默认版本,以免继续使用错误的版本吗?
(补充问题:我是否必须为 pip/pip3 做类似的事情?)
[运行 Ubuntu 17.04]
【问题讨论】:
-
为澄清而编辑,我正在运行 Ubuntu 17.04
标签: python python-3.x python-idle python-venv