我用自制软件安装了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高塞拉10.13.1
pip3 install twilio
-bash: pip3: command not found发布于 2017-11-13 02:28:32
好的,它花了我很多谷歌,但问题是,在高塞拉,所有权限在usr/本地更改和自制必须创建一些文件夹内usr/local。以下是我解决所有问题的方法:
我试着使用
sudo brew install python3,但这也直接导致了一个来自Homebrew的错误,告诉我它不允许使用sudo brew。
使用sudo在/usr/local内创建我需要的文件夹:
sudo mkdir lib
sudo mkdir Frameworks更改/usr/local内部的权限,以便自制软件可以访问它们:
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发布于 2018-06-12 16:13:31
在解决链接问题(如https://github.com/Homebrew/homebrew-core/issues/19286 )之后,将安装python3,但不安装pip3。重新安装python (例如brew重新安装python)最终也会安装pip3。这些步骤对我来说很管用。
发布于 2018-01-14 21:09:28
GitHub user @aether2501,评语在sudo解决方案中拒绝了"Homebrew许可“问题,相反,建议在升级到High之后卸载/重新安装Homebrew。
我成功地使用@aether2501的重新安装命令,/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)",在高等塞拉利昂(10.13.2),而没有首先卸载brew。
除了创建/usr/local/Frameworks目录和设置链接python3所需的所有权和权限外,它似乎还解决了其他目录问题。
https://stackoverflow.com/questions/47255517
复制相似问题