【发布时间】:2017-07-31 08:42:50
【问题描述】:
安装 Python 3.6.1 和 Python 2.7.13 后,如何在 Windows 10 上运行 scons?在我的命令窗口中输入python 时,我得到以下输出:
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
由于我个人使用 Python 3.6.x,这对我来说很好,我不想更改它。
在我的命令窗口中输入py -2 时,我得到以下输出:
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
scons 不适用于 Python 3.x。它需要使用 Python 2.7.x 执行。如何“告诉” scons 使用 Python 2.7.x?
当我在命令提示符中输入 scons 时,我得到以下输出:
PS C:\dev\projectX> scons
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007050 (most recent call first):
【问题讨论】:
标签: python windows python-2.7 scons build-system