BREW安装python3没有安装PIP3 [英] brew install python3 didn't install pip3
本文介绍了BREW安装python3没有安装PIP3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用自制软件安装了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已安装但无法识别。如有任何帮助,我们将不胜感激。
信息:
OS=>MacOS High Sierra 10.13.1
pip3 install twilio
-bash: pip3: command not found
推荐答案
好的,我花了很多时间搜索,但问题是在高级SERA中,USR/LOCAL内的所有权限都更改了,而HOME BREW必须在USR/LOCAL内创建一些文件夹。以下是我是如何解决所有问题的:我尝试使用sudo brew install python3
,但也引发了错误 直接从Homebrew告诉我它不允许使用sudo brew
。
在/usr/local:中使用sudo mkdir创建我需要的文件夹
sudo mkdir lib
sudo mkdir Frameworks
更改/usr/local内的权限,以便HOMEBREW可以访问它们:
sudo chown -R $(whoami) $(brew --prefix)/*
现在安装python3
brew install python3
这将使您成功安装:
==> Pouring python3-3.6.3.high_sierra.bottle.tar.gz
==> /usr/local/Cellar/python3/3.6.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python3/3.6.3/bin --in
==> /usr/local/Cellar/python3/3.6.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python3/3.6.3/bin --in
==> /usr/local/Cellar/python3/3.6.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python3/3.6.3/bin --in
==> 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
==> Summary
🍺 /usr/local/Cellar/python3/3.6.3: 3,588 files, 56.1MB
这篇关于BREW安装python3没有安装PIP3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文