2016-08-14 50 views
1

我試圖在Windows中啓動電子應用通過https://github.com/electron/electron/blob/master/docs/development/build-instructions-windows.md蟒蛇:無法打開文件「scriptbootstrap.py」

我已經成功完成了前兩步,並停留在建築部分。

當我嘗試運行python script\build.py,會出現以下錯誤:

python: can't open file 'scriptbootstrap.py': [Errno 2] No such file or directory 

並不僅僅是這個命令明確。沿線的任何命令(例如python script\build.py -c D)都會讓我陷入困境。我通過窗戶慶典

運行命令我認爲它應該尋找腳本/ bootstrap.py而是尋找

+0

此文件不存在,或者您沒有訪問權限。 – mpampana

+0

感謝您的評論。該文件存在於腳本/ bootstrap.py中,但它只是查看scriptbootstrap.py – John

回答

0

首先,我想知道是否python script\bootstrap.py -v工作了你。

看樣輸出,我的機器上,(用git bash)的

[email protected] 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 -vpython script/bootstrap.py -v,並python script\build.pypython script/build.py