最新消息:20210917 已从crifan.com换到crifan.org

【已解决】Mac中安装appium的Python库

Mac crifan 438浏览 0评论
折腾:
【已解决】Mac中初始化搭建appium的Python的运行环境
期间,
去Mac中安装appium的库
此处已有pipenv的虚拟环境,所以去:
 pipenv install appium        
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing appium...
Error:  An error occurred while installing appium!
Error text: 
ERROR: Could not find a version that satisfies the requirement appium (from versions: none)
ERROR: No matching distribution found for appium


✘ Installation Failed 
无法正常安装
难道是此处的Python版本3.9.1太高,appium不支持最新的Python?
去网上找找
appium python
Appium-Python-Client · PyPI
pip install Appium-Python-Client
APP自动化测试神器之Appium-Python环境部署及脚本实战 – 知乎 (zhihu.com)
python+appium使用方法 – Mrwhite86 – 博客园 (cnblogs.com)
看来是名字错了,去试试:
pipenv install Appium-Python-Client
可以了:
 pipenv install Appium-Python-Client
。。。
Installing Appium-Python-Client...
Adding Appium-Python-Client to Pipfile's [packages]...
✔ Installation Succeeded 
。。。
完整log
 pipenv install Appium-Python-Client
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing Appium-Python-Client...
Adding Appium-Python-Client to Pipfile's [packages]...
✔ Installation Succeeded 
Pipfile.lock (6d99c8) out of date, updating to (a6a1ad)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✔ Success! 
Updated Pipfile.lock (a6a1ad)!
Installing dependencies from Pipfile.lock (a6a1ad)...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
如此,即可
代码中,即可导入:
from appium import webdriver
就不会报错了。
【总结】
此处,Appium的Python的库,不是appium,而是Appium-Python-Client
所以,Mac中安装appium,是:
pipenv install Appium-Python-Client
或:
pip install Appium-Python-Client

转载请注明:在路上 » 【已解决】Mac中安装appium的Python库

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
95 queries in 0.145 seconds, using 21.59MB memory