首页 > 解决方案 > PlatformIO 与 Atom 上的 Python 2 冲突

问题描述

如果我想在 ATOM 中运行 Python,我必须始终禁用 PlatformIO 并再次重新启动 ATOM,这样它才能正常工作。我设法通过将我安装的 Python 包指向运行 Python 3 而不是标准 Python (Python 2) 来避免这种痛苦,但我真的希望我能理解正在发生的事情,以便我可以根据需要自由使用任何版本。有什么亮点吗?

我的系统是 Linux(mint 19)谢谢!!!

标签: python-2.7python-3.6linux-mintplatformio

解决方案


听起来您的默认 Python 是 2.7,但所有内容都是针对 Python 3 安装的,并且 Atom 始终使用 Python 2。您可以通过更改 Atom 使用的默认 Python 来解决此问题。

对于一次性使用,请尝试如何配置 Atom 以运行 Python3 脚本?并且要永久更改 Atom 的 Python 版本,请查看如何设置 Atom 的脚本以运行 Python 3.x 脚本?与 Windows 7 Pro x64 的组合可能是问题吗?(尽管标题中有 Windows 7 Pro,但该解决方案通常适用于 Atom)。


推荐阅读