python - 在 Linux 上使用 python 3 启动 IDLE(同时安装了 python 2.7)

标签 python python-3.2 python-idle

我最初使用的是 python 2.7,它通常与操作系统捆绑在一起(目前使用的是 Linux Mint 12)。我想尝试 python 3,所以我将它与 python 2 一起安装。一切都很好,我可以通过调用 pythonpython3 在终端中运行这两个版本。但是,似乎无法使用 python 3 启动 IDLE。是否有一些标志可以在启动时传递给 IDLE,以便我可以选择我希望它运行的 python 版本?

例如(这些不起作用) idle3idle --shell=python3 或类似的东西。希望你明白我的意思。我在 this question about IDLE for Python 3 (on Vista) 中读到关于指向不同的可执行文件的信息.但是,我似乎无法在 Linux 上做类似的事情。

最佳答案

只需在您的终端中输入 sudo apt-get install idle3 即可安装您之前安装的 Python 3 版本的 idle。 然后两者兼容。只需键入 idle,即可从终端运行 2.7 idle。您只需在终端中输入 idle3 即可运行 idle 3 版本。那对我有用。

关于python - 在 Linux 上使用 python 3 启动 IDLE(同时安装了 python 2.7),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11856802/

相关文章:

Python子进程失败,取决于IDLE的打开方式

python - matplotlib 中 plt.draw() 和 plt.show() 的区别

python - 如何修复 "googlemaps.exceptions.ApiError : REQUEST_DENIED"

python - 从列表转换为字符串 Python

ubuntu - Python3 和 Pandas

Python: webbrowser.open ("") 打开文件资源管理器窗口

python - 如何让 .py 文件直接打开到 Idle

python - 计算 pandas 数据框中速度的函数

python - 将 float 组渲染为 24 位 RGB 图像(例如使用 PIL)

python - fatal error : 'string.h' file not found after upgrading to python 3. 2 并从 virtualenv 安装某些模块