You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows 10下Python3.10安装scons后命令无法识别问题

问题:Python 3.10.7安装Scons后无法调用scons命令

在全新Windows 10电脑上安装Python 3.10.7后,执行pip install scons安装Scons,但终端输入scons时持续报错:

C:\Users\tempm>scons
'scons' is not recognized as an internal or external command,
operable program or batch file. 

已将以下路径添加至PATH环境变量,但问题仍未解决:

  • C:\Users\tempm\AppData\Local\Programs\Python\Python310\Scripts
  • C:\Users\tempm\AppData\Local\Programs\Python\Python310
  • C:\Users\tempm\AppData\Local\Programs\Python\Python310\Lib\site-packages\SCons\Script及其所有子目录

查看Python Scripts目录,未找到scons.exe:

Directory of C:\Users\tempm\AppData\Local\Programs\Python\Python310\Scripts

16/09/2022  02:23 PM    <DIR>          .
16/09/2022  02:23 PM    <DIR>          ..
16/09/2022  02:23 PM           107,912 pip.exe
16/09/2022  02:23 PM           107,912 pip3.10.exe
16/09/2022  02:23 PM           107,912 pip3.exe
               3 File(s)        323,736 bytes
               2 Dir(s)  83,683,979,264 bytes free

再次执行pip install scons,提示已安装:

Requirement already satisfied: scons in c:\users\tempm\appdata\local\programs\python\python310\lib\site-packages (4.4.0)
Requirement already satisfied: setuptools in c:\users\tempm\appdata\local\programs\python\python310\lib\site-packages (from scons) (63.2.0)

解决方案

通过Python 3.10的pip安装Scons未生成scons.exe,安装Python 3.8并使用其pip安装Scons后,scons.exe成功出现在对应Scripts目录,问题解决。推测可能是Python 3.10存在兼容性问题。

安装Python注意事项

安装Python时务必勾选添加至环境变量选项,全新机器更需注意,避免后续配置麻烦。

内容的提问来源于stack exchange,提问作者Shizo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 11:20:28