iOS UI自动化--Appium环境安装

背景:新到了mac,开始安装环境

第一步:安装brew

Homebrew官网:
Homebrew — The Missing Package Manager for macOS (or Linux)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

使用命令行时报错:

curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 19 ms: Couldn't connect to server

【解决】到github上下载.pkg包安装,homebrew安装包地址:

Release 4.2.0 · Homebrew/brew · GitHub

Release 4.1.24 · Homebrew/brew · GitHub

安装 homebrew时的提示:
This package will install to:
⁃ /opt/homebrew on Apple Silicon
⁃ /usr/local/bin/brew and /usr/local/Homebrew on Intel

第二步:安装 命令行工具

Command Line Tools (CLT) are missing
You must install the Command Line Tools (CLT) before installing Homebrew by running xcode-select --install from a Terminal.

按照提示执行xcode-select --install

已安装后提示:
xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

第三步:安装python

mac自带的python版本是:

testmanzhang@TestMandeMBP ~ % python3 --version

Python 3.9.6

升级python:

brew upgrade python

提示:

Error: The following directories are not writable by your user:

/usr/local/opt

You should change the ownership of these directories to your user.

sudo chown -R testmanzhang /usr/local/opt

And make sure that your user has write permission.

chmod u+w /usr/local/opt

【解决】下载python安装包安装

添加Python环境变量:

vi ~/.zshrc

PATH="/Library/Frameworks/Python.framework/Versions/3.12/bin:${PATH}"

export PATH

alias python="/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12"

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值