我使用了 Homebrew 命令 brew install <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fc8c8588949392bccfd2cdcc" rel="noreferrer noopener nofollow">[email protected]</a>
在我的 Mac 上安装 Python3.10。
但是,当我在终端中输入 python
然后按 Tab,它只给我位于/usr/bin/中的 Python 3 的选项
如何输入位于/opt/homebrew/Cellar/的 3.10 解释器
最佳答案
正在运行brew info <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c0b0b9b4a8afae80f3eef1f0" rel="noreferrer noopener nofollow">[email protected]</a>
将为您提供问题的解决方案:
If you need to have <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d1a1a8a5b9bebf91e2ffe0e1" rel="noreferrer noopener nofollow">[email protected]</a> first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4d3d34392522230d7e637c7d" rel="noreferrer noopener nofollow">[email protected]</a>/bin:$PATH"' >> ~/.zshrc
关于homebrew - Homebrew 安装后尝试从终端运行 Python 3.10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72148538/