我正在尝试通过 https://github.com/electron/electron/blob/master/docs/development/build-instructions-windows.md 在 Windows 上启动 Electron 应用程序
我已成功完成前两个步骤,但卡在了建筑部分。
当我尝试运行python script\build.py
时,出现以下错误:
python: can't open file 'scriptbootstrap.py': [Errno 2] No such file or directory
不仅仅是这个命令。沿着这条线的任何命令,例如我运行的 python script\build.py -c D ,也会给我带来麻烦。我正在通过 windows bash 运行命令
我认为它应该寻找 script/bootstrap.py 而是寻找
最佳答案
首先,我想知道python script\bootstrap.py -v
是否适合您。
在我的机器上查看示例输出(使用 git bash)
Anubhavs@DDSPL1392 MINGW64 /e/Projects/electron (master)
$ python script/bootstrap.py -v
Submodule 'vendor/boto' (https://github.com/boto/boto.git) registered for path 'vendor/boto'
Submodule 'vendor/breakpad' (https://github.com/electron/chromium-breakpad.git) registered for path 'vendor/breakpad'
Submodule 'vendor/brightray' (https://github.com/electron/brightray.git) registered for path 'vendor/brightray'
Submodule 'vendor/crashpad' (https://github.com/electron/crashpad.git) registered for path 'vendor/crashpad'
Submodule 'vendor/depot_tools' (https://chromium.googlesource.com/chromium/tools/depot_tools.git) registered for path 'vendor/depot_tools'
Submodule 'vendor/native_mate' (https://github.com/zcbenz/native-mate.git) registered for path 'vendor/native_mate'
Submodule 'vendor/node' (https://github.com/electron/node.git) registered for path 'vendor/node'
Submodule 'vendor/requests' (https://github.com/kennethreitz/requests) registered for path 'vendor/requests'
Cloning into 'vendor/boto'...
remote: Counting objects: 42186, done.
<more lines cloning different dependencies.>
.
.
.
第二, 我建议在路径中使用 '/' 而不是 '\' 。这在 Windows cmd 中运行良好。但是,这并不是跨不同脚本处理路径的方式。 '/' 始终有效。
运行两个命令,python script\bootstrap.py -v
作为 python script/bootstrap.py -v
和 python script\build.py
as python script/build.py
关于javascript - python: 无法打开文件 'scriptbootstrap.py',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38944608/