python - 安装Appium的一些问题

标签 python node.js appium

我尝试通过在 Python 终端中写入 npm install -g appium 来安装 Appium。发生错误:“Node 未被识别为内部或外部命令、可操作程序或批处理文件”。 下面我展示我的控制台日志。

C:\Program Files\nodejs>npm install -g appium
C:\Users\MarcinPilzak\AppData\Roaming\npm\authorize-ios -> C:\Users\MarcinPilzak\AppData\Roaming\npm\node_modules\appium\node_modules\.bin\authorize-ios
C:\Users\MarcinPilzak\AppData\Roaming\npm\appium -> C:\Users\MarcinPilzak\AppData\Roaming\npm\node_modules\appium\build\lib\main.js

> appium-selendroid-driver@1.13.4 install C:\Users\MarcinPilzak\AppData\Roaming\npm\node_modules\appium\node_modules\appium-selendroid-driver
> node ./bin/install.js

'node' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules\appium\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-selendroid-driver@1.13.4 install: `node ./bin/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-selendroid-driver@1.13.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\MarcinPilzak\AppData\Roaming\npm-cache\_logs\2019-09-23T12_10_51_490Z-debug.log

编辑:

我按照你的建议做了:

C:\Users\MarcinPilzak\AppData\Local\Programs\Python\Python37-32>python -m pip install appium
Collecting appium

我得到了这样的错误:

ERROR: Could not find a version that satisfies the requirement appium (from versions: none)
ERROR: No matching distribution found for appium

最佳答案

要使用 Python 安装库,您需要导航到 Python 文件夹(无论该文件夹位于何处)。然后转到/Scripts 并复制该目录。 现在转到命令行并执行以下操作:

cd <paste copied directory here>

然后执行:

python -m pip install appium

这应该有效。如果没有,请告诉我。

关于python - 安装Appium的一些问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58062315/

相关文章:

node.js - Node js 应用程序在控制台关闭时停止

node.js - 客户端的Socket.IO

使用串行端口时 Node.js 停止响应

android - 是否可以通过 Appium 启动已安装在 Android Emulator 上的 Chrome?

python - Pandas:如何从 DataFrame 中删除重复行并计算它们的频率?

python - 使用 MySQLdb 的嵌套查询

python - 在 python 脚本中生成包含图像和文本的 html 文档(如果可能,无需服务器)

python - 如何在shell脚本的变量中排除python脚本的打印命令

java - 我应该使用什么命令来解决这个问题?

android - 使用 appium 进行通用移动测试