我使用自制软件安装了 python3 但它没有安装 pip3 或者我应该说它已安装但它无法识别命令?
这是我所做的:
brew install python3
这安装了 python3 但最后抛出一个错误说它无法链接 python3 并提示我运行
brew link python3
链接安装但这会引发另一个错误:
Linking /usr/local/Cellar/python3/3.6.3... Error: Permission denied @ dir_s_mkdir - /usr/local/lib
有谁知道如何解决这个问题?当我跑步时:
brew info python3
它说:
==> Caveats
Pip, setuptools, and wheel have been installed. To update them
pip3 install --upgrade pip setuptools wheel
You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/usr/local/lib/python3.6/site-packages
See: https://docs.brew.sh/Homebrew-and-Python.html
这让我觉得 pip3 已安装但未被识别。任何帮助表示赞赏。
信息:
操作系统 => MacOS High Sierra 10.13.1
pip3 install twilio
-bash: pip3: command not found
原文由 Alexander Luna 发布,翻译遵循 CC BY-SA 4.0 许可协议
好吧,我花了很多时间谷歌搜索,但问题是在 high sierra 中,usr/local 中的所有权限都发生了变化,自制软件必须在 usr/local 中创建一些文件夹。这是我解决所有问题的方法:
在 /usr/local 中使用 sudo mkdir 创建我需要的文件夹:
更改 /usr/local 中的权限,以便自制程序可以访问它们:
现在安装python3
这将使您成功安装: