% pip install spicy error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try brew install xyz, where xyz is the package you are trying to install. If you wish to install a Python library that isn't in Homebrew, use a virtual environment: python3 -m venv path/to/venv source path/to/venv/bin/activate python3 -m pip install xyz
spicyを入れようとしたら pythonがmacのデフォルトのなのでここに入れられないと
python3 -m venv ~/myvenv
ホームの下にmyvenvに
% source ~/myvenv/bin/activate (myvenv) j %
とmyvenvで実行できます。
(myvenv) j % pip3 install spicy Requirement already satisfied: numpy<2.5,>=1.23.5 in /Users/j/myvenv/lib/python3.13/site-packages (from scipy->spicy) (2.2.4)
これは二度目なので入っていると
(myvenv)状態で使えました
コメント