brew安装python3';不要安装pip3

brew安装python3';不要安装pip3,python,macos,python-3.x,pip,homebrew,Python,Macos,Python 3.x,Pip,Homebrew,我使用自制软件安装了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/

我使用自制软件安装了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

好吧,我用了很多谷歌搜索,但问题是在high sierra中,usr/local中的所有权限都已更改,homebrew必须在usr/local中创建一些文件夹。以下是我如何解决所有问题的:

我尝试使用
sudobrew安装python3
,但也出现了一个错误 直接来自自制,告诉我它不允许使用
sudo-brew

在/usr/local:

sudo mkdir lib 
sudo mkdir Frameworks
sudo chown -R $(whoami) $(brew --prefix)/*
==> 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
GitHub user @aether2501, commenting on a sudo chown solution for a "Homebrew Permission Denied" problem, suggests instead that Homebrew be  uninstalled/reinstalled after the upgrade to High Sierra.

I successfully used @aether2501's reinstall command,
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
, on High Sierra (10.13.2) without uninstalling brew first.

In addition to creating the /usr/local/Frameworks directory and setting the necessary ownership and permissions I needed to link python3, it also appears to have fixed other directory issues.

I had the same issue and used:

sudo -H pip3 install virtualenv
sudo -H pip3 install virtualenvwrapper --ignore-installed six
更改/usr/local中的权限,以便homebrew可以访问它们:

sudo mkdir lib 
sudo mkdir Frameworks
sudo chown -R $(whoami) $(brew --prefix)/*
==> 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
GitHub user @aether2501, commenting on a sudo chown solution for a "Homebrew Permission Denied" problem, suggests instead that Homebrew be  uninstalled/reinstalled after the upgrade to High Sierra.

I successfully used @aether2501's reinstall command,
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
, on High Sierra (10.13.2) without uninstalling brew first.

In addition to creating the /usr/local/Frameworks directory and setting the necessary ownership and permissions I needed to link python3, it also appears to have fixed other directory issues.

I had the same issue and used:

sudo -H pip3 install virtualenv
sudo -H pip3 install virtualenvwrapper --ignore-installed six
现在安装python3

brew install python3
这将为您提供成功的安装:

sudo mkdir lib 
sudo mkdir Frameworks
sudo chown -R $(whoami) $(brew --prefix)/*
==> 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
GitHub user @aether2501, commenting on a sudo chown solution for a "Homebrew Permission Denied" problem, suggests instead that Homebrew be  uninstalled/reinstalled after the upgrade to High Sierra.

I successfully used @aether2501's reinstall command,
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
, on High Sierra (10.13.2) without uninstalling brew first.

In addition to creating the /usr/local/Frameworks directory and setting the necessary ownership and permissions I needed to link python3, it also appears to have fixed other directory issues.

I had the same issue and used:

sudo -H pip3 install virtualenv
sudo -H pip3 install virtualenvwrapper --ignore-installed six
==>倒蟒蛇3-3.6.3.high_sierra.瓶子.tar.gz
==>/usr/local/ceral/python3/3.6.3/bin/python3-s setup.py--无用户cfg安装--强制--详细--安装脚本=/usr/local/ceral/python3/3.6.3/bin--在
==>/usr/local/ceral/python3/3.6.3/bin/python3-s setup.py--无用户cfg安装--强制--详细--安装脚本=/usr/local/ceral/python3/3.6.3/bin--在
==>/usr/local/ceral/python3/3.6.3/bin/python3-s setup.py--无用户cfg安装--强制--详细--安装脚本=/usr/local/ceral/python3/3.6.3/bin--在
==>注意事项
已安装Pip、设置工具和控制盘。更新它们
pip3安装--升级pip设置工具控制盘
您可以使用安装Python包
pip3安装
它们将安装到站点包目录中
/usr/local/lib/python3.6/site-packages
见:https://docs.brew.sh/Homebrew-and-Python.html
==>摘要
GitHub用户@aether2501在sudo chown解决方案中提出“拒绝自制权限”,建议在升级到High Sierra后卸载/重新安装自制

我成功地使用了@aether2501的重新安装命令,
/usr/bin/ruby-e“$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)“
,在High Sierra(10.13.2)上,无需先卸载brew


除了创建/usr/local/Frameworks目录并设置链接python3所需的所有权和权限外,它似乎还修复了其他目录问题。

我也遇到了同样的问题,并使用了:

brew unlink python@3.9; brew link python@3.9

解决链接问题后(例如),安装了python3,但没有安装pip3。重新安装python(例如brew重新安装python)最终也会安装pip3。这些步骤对我很有效。

在我的情况下,这解决了问题:


(您可能需要将版本号替换为已安装的版本)

我的直觉告诉您,您不需要
pip3
,因为
pip
会根据您的环境选择当前活动的python版本。我的
pip3
在这里
/usr/local/bin/pip3
“在high sierra中,usr/local中的所有权限都已更改”您有相关的来源吗?升级到high sierra我没有任何问题。我在github上读到了这一点:当我列出usr/local目录时,大多数文件夹都需要“root”访问权限。创建所有brew无法创建的文件夹后,因为我无法运行“sudo brew”我将权限从“root”更改为“me”,brew现在可以正常工作。更新-我在我的计算机上又创建了一个文件夹local/opt。然后执行权限命令。它现在工作得很好(python3+pip3)。谢谢你的问答。太棒了,你救了我一天!完成这些步骤后,必须运行
brew重新安装python3
,才能安装pip3