2015-04-02 176 views
0

嘗試使用以下命令在Windows上安裝appium: npm install -g appium「appium」不被識別爲一個內部或外部命令,可操作的程序或批處理文件

但我得到以下error.Please給我一些解決方案要解決這個problem.Just我下載appium窗戶,然後我試着在命令提示符npm install -g appium命令。

C:\Users\Gideon>npm install -g appium 
npm WARN `git config --get remote.origin.url` returned wrong result (git://githu 
b.com/vojtajina/traceur-compiler) undefined 
npm WARN `git config --get remote.origin.url` returned wrong result (git://githu 
b.com/vojtajina/traceur-compiler) undefined 
npm ERR! git clone git://github.com/vojtajina/traceur-compiler undefined 
npm ERR! git clone git://github.com/vojtajina/traceur-compiler undefined 
\ 


> [email protected] install C:\Users\Gideon\AppData\Roaming\npm\node_modules\appi 
um\node_modules\ws\node_modules\bufferutil 
> node-gyp rebuild 

| 
C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_modules\ws\node_mod 
ules\bufferutil>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\ 
\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild 
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT 
HON env variable. 
gyp ERR! stack  at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod 
e_modules\node-gyp\lib\configure.js:103:14) 
gyp ERR! stack  at C:\Program Files\nodejs\node_modules\npm\node_modules\node 
-gyp\lib\configure.js:64:11 
gyp ERR! stack  at Object.oncomplete (evalmachine.<anonymous>:108:15) 
gyp ERR! System Windows_NT 6.2.9200 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu 
les\\node-gyp\\bin\\node-gyp.js" "rebuild" 
ERR! cwd C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_modules\w 
s\node_modules\bufferutil 
gyp ERR! node -v v0.10.35 
gyp ERR! node-gyp -v v1.0.1 
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected] 


> [email protected] install C:\Users\Gideon\AppData\Roaming\npm\node_modules\ 
appium\node_modules\ws\node_modules\utf-8-validate 
> node-gyp rebuild 


C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_modules\ws\node_mod 
ules\utf-8-validate>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp- 
bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild 
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT 
HON env variable. 
gyp ERR! stack  at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod 
e_modules\node-gyp\lib\configure.js:103:14) 
gyp ERR! stack  at C:\Program Files\nodejs\node_modules\npm\node_modules\node 
-gyp\lib\configure.js:64:11 
gyp ERR! stack  at Object.oncomplete (evalmachine.<anonymous>:108:15) 
gyp ERR! System Windows_NT 6.2.9200 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu 
les\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_module 
s\ws\node_modules\utf-8-validate 
gyp ERR! node -v v0.10.35 
gyp ERR! node-gyp -v v1.0.1 
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected] 
- 


> [email protected] install C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_ 
modules\socket.io\node_modules\engine.io\node_modules\ws 
> (node-gyp rebuild 2> builderror.log) || (exit 0) 

| 
C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_modules\socket.io\n 
ode_modules\engine.io\node_modules\ws>node "C:\Program Files\nodejs\node_modules 
\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild 
| 
> [email protected] install C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node 
_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\n 
ode_modules\ws 
> (node-gyp rebuild 2> builderror.log) || (exit 0) 


C:\Users\Gideon\AppData\Roaming\npm\node_modules\appium\node_modules\socket.io\n 
ode_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws>node 
"C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\n 
ode-gyp\bin\node-gyp.js" rebuild 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.35 
","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.1 
0.35","npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.35" 
,"npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.35" 
,"npm":"1.4.28"}) 
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"0.10.35" 
,"npm":"1.4.28"}) 
npm ERR! not found: git 
npm ERR! 
npm ERR! Failed using git. 
npm ERR! This is most likely not a problem with npm itself. 
npm ERR! Please check if you have git installed and in your PATH. 

npm ERR! System Windows_NT 6.2.9200 
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod 
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "appium" 
npm ERR! cwd C:\Users\Gideon 
npm ERR! node -v v0.10.35 
npm ERR! npm -v 1.4.28 
npm ERR! code ENOGIT 
npm ERR! not ok code 0 


C:\Users\Gideon>appium 

「appium」不被識別爲一個內部或外部的命令,可操作的程序或批處理文件。

回答

0

聽起來像是你可能需要檢查你的系統的PATH變量。

控制面板 - >系統 - >高級 - >環境變量 - >系統變量 - >選擇路徑 - >編輯 - >

礦有:

C:\Ruby193\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Hewlett-Packard\SimplePass\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin;C:\Program Files (x86)\SimpleIDE\propeller-gcc\bin;c:\python27;c:\python27\scripts;C:\Program Files\nodejs;C:\Program Files (x86)\Git\cmd 

注意,我必須手動添加一個爲Ruby,Python和蟒蛇\腳本的NodeJS,Git的\ CMD,...

您可能需要做的到。然後重新啓動以將其放置到位。

相關問題