pip install browser-use
を実行したら
ERROR: Ignored the following versions that require a different python version: 0.1.0 Requires-Python >=3.11; 0.1.1 Requires-Python >=3.11; 0.1.10 Requires-Python >=3.11; 0.1.11 Requires-Python >=3.11; 0.1.12 Requires-Python >=3.11; 0.1.13 Requires-Python >=3.11; 0.1.14 Requires-Python >=3.11; 0.1.15 Requires-Python >=3.11; 0.1.16 Requires-Python >=3.11; 0.1.17 Requires-Python >=3.11; 0.1.18 Requires-Python >=3.11; 0.1.19 Requires-Python >=3.11; 0.1.20 Requires-Python >=3.11; 0.1.21 Requires-Python >=3.11; 0.1.22 Requires-Python >=3.11; 0.1.23 Requires-Python >=3.11; 0.1.3 Requires-Python >=3.11; 0.1.4 Requires-Python >=3.11; 0.1.5 Requires-Python >=3.11; 0.1.6 Requires-Python >=3.11; 0.1.7 Requires-Python >=3.11; 0.1.8 Requires-Python >=3.11 ERROR: Could not find a version that satisfies the requirement browser-use (from versions: none) ERROR: No matching distribution found for browser-use
となった
python3 --version Python 3.10.6
これが原因なので
バージョンを変える
過去ログを見たら
とりあえず python 3.10 を入れる
今の環境を python -V
で調べたら3.8.12だった
pyenv install 3.10.6
で参考サイトと同じバージョンをインストール
pyenv global 3.10.6
で使用するバージョンを変更
となっていたので
Pyenvを使い更新
pyenv install 3.11
しかし
BUILD FAILED (OS X 15.2 using python-build 20180424) Inspect or clean up the working tree at /var/folders/db/tkl5w9dd3kn3h53ctyl4s6180000gn/T/python-build.20250115025749.25266 Results logged to /var/folders/db/tkl5w9dd3kn3h53ctyl4s6180000gn/T/python-build.20250115025749.25266.log Last 10 log lines: __locale_localeconv in _localemodule.o __locale_localeconv in _localemodule.o __locale_localeconv in _localemodule.o "_libintl_textdomain", referenced from: __locale_textdomain in _localemodule.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Programs/_freeze_module] Error 1 make: *** Waiting for unfinished jobs.... 2 warnings generated.
となる
brew update
しても変わらない
chatGPTでは
brew install openssl readline xz zlib gettext
っていうけど
==> Downloading https://formulae.brew.sh/api/formula.jws.json ==> Downloading https://formulae.brew.sh/api/cask.jws.json openssl@3 3.3.1 is already installed but outdated (so it will be upgraded). readline is already installed but outdated (so it will be upgraded). xz 5.6.2 is already installed but outdated (so it will be upgraded). gettext 0.22.5 is already installed but outdated (so it will be upgraded). Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)! To rerun under ARM use: arch -arm64 brew install ... To install under x86_64, install Homebrew into /usr/local.
となる
このためエラーログで検索する
python-build: use zlib from xcode sdk BUILD FAILED (OS X 15.2 using python-build 20180424) Inspect or clean up the working tree at /var/folders/db/tkl5w9dd3kn3h53ctyl4s6180000gn/T/python-build.20250115030607.37878 Results logged to /var/folders/db/tkl5w9dd3kn3h53ctyl4s6180000gn/T/python-build.20250115030607.37878.log Last 10 log lines: __locale_localeconv in _localemodule.o __locale_localeconv in _localemodule.o __locale_localeconv in _localemodule.o "_libintl_textdomain", referenced from: __locale_textdomain in _localemodule.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Programs/_freeze_module] Error 1 make: *** Waiting for unfinished jobs.... 2 warnings generated.
で検索
M1 Mac にpyenvで環境構築してみたらBUILD FAILEDと怒られた件
を参考にしたけど
だめ
BUILD FAILED (OS X 15.2 using python-build 20180424)
で検索
pyenvでインストール時に「BUILD FAILED (OS X 10.15.7 using python-build 20180424)」が発生した場合の対処法
を参考に
arch -arm64 brew install zlib
でインストール
これでもダメなので
M2 Mac】pyenv環境構築でハマった話 (BUILD FAILED)
を参考に
arch -arm64 brew install readline openssl zlib xz
これでもだめ
なぜかx86_64向けにビルドしようとしていて,ホストもx86_64になっているため
PYTHON_CONFIGURE_OPTS="--host=arm-apple-darwin --build=arm-apple-darwin" \ CFLAGS="-I$(brew --prefix readline)/include -I$(brew --prefix openssl)/include -I$(brew --prefix zlib)/include -I$(brew --prefix xz)/include -arch arm64" \ LDFLAGS="-L$(brew --prefix readline)/lib -L$(brew --prefix openssl)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix xz)/lib -arch arm64" \ pyenv install -v 3.11.0
というように
* PYTHON_CONFIGURE_OPTS: ホストとビルドシステムをarm-apple-darwin に明示。
* CFLAGS とLDFLAGS : 必要なライブラリのパスを正確に指定し、-arch arm64 を追加。
とすれば
インストール成功
あとは
pyenv global 3.11.0
で設定して
python -V Python 3.11.0
となれば成功