Brew install python3 did not install pip3

I installed python3 using homebrew, but it did not install pip3, or should I say that it is installed, but it does not recognize the command?

Here is what I did:

brew install python3 

This one installed python3, but eventually threw an error saying that it cannot bind python3 and will prompt me to run

 brew link python3 

to bind the installation, but this causes another error:

 Linking /usr/local/Cellar/python3/3.6.3... Error: Permission denied @ dir_s_mkdir - /usr/local/lib 

Does anyone know how to solve this? When I run:

 brew info python3 

It says:

 ==> 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 

Which makes me think that pip3 is installed but not recognized. Any help is appreciated.

INFO:

OS => MacOS High Sierra 10.13.1

  pip3 install twilio -bash: pip3: command not found 
+5
source share
2 answers

Well, it took me a lot of search engines, but the problem is that in high sierra all permissions inside usr / local are changed, and homebrew should create some folder inside usr / local. This is how I decided everything:

I tried using sudo brew install python3 , but it also caused an error directly from Homebrew telling me that this does not allow using sudo brew .

Create the desired folders using sudo mkdir inside / usr / local:

 sudo mkdir lib sudo mkdir Frameworks 

Change permissions inside / usr / local so that homebrew can access them:

 sudo chown -R $(whoami) $(brew --prefix)/* 

Now install python3

 brew install python3 

This will give you a successful installation:

 ==> 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 
+11
source

GitHub user @ aether2501, commenting on the sudo chown solution for "Home Prohibition Permission", instead it is recommended that Homebrew be uninstalled / reinstalled after upgrading to High Sierra.

I successfully used the @ eether2501 command to reinstall, /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" , in High Sierra (10.13.2 ) without first removing the brew.

In addition to creating the / usr / local / Frameworks directory and setting up the necessary ownership and permissions required to communicate with python3, there are also problems with another directory.

0
source

Source: https://habr.com/ru/post/1273306/


All Articles