I uninstalled python3 using brew uninstall --ignore-dependencies python3 since I was getting a pip3: command not found error. Upon reinstallation, the post-installation does not occur successfully. I get the following:
brew install python3
==> Downloading https://homebrew.bintray.com/bottles/python3-3.6.3.high_sierra.bottle.tar.gz
Already downloaded: /Users/thomas/Library/Caches/Homebrew/python3-3.6.3.high_sierra.bottle.tar.gz
==> 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 --in
==> /usr/local/Cellar/python3/3.6.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --in
==> /usr/local/Cellar/python3/3.6.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --in
Last 15 lines from /Users/thomas/Library/Logs/Homebrew/python3/post_install.03.python3:
writing requirements to wheel.egg-info/requires.txt
writing top-level names to wheel.egg-info/top_level.txt
reading manifest file 'wheel.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'wheel/*.txt'
warning: no files found matching '*.py' under directory 'wheel/test'
warning: no files found matching 'wheel/test/test-1.0-py2.py3-none-win32.whl'
warning: no files found matching 'wheel/test/headers.dist/header.h'
warning: no files found matching 'wheel/test/pydist-schema.json'
no previously-included directories found matching 'wheel/test/*/dist'
no previously-included directories found matching 'wheel/test/*/build'
writing manifest file 'wheel.egg-info/SOURCES.txt'
running install_lib
copying build/lib/wheel/metadata.py -> /usr/local/lib/python3.6/site-packages/wheel
error: could not delete '/usr/local/lib/python3.6/site-packages/wheel/metadata.py': Permission denied
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall 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
==> Summary
馃嵑 /usr/local/Cellar/python3/3.6.3: 3,587 files, 56.1MB
thomass-mbp:~ thomas$ brew postinstall python3
==> Postinstalling python3
==> /usr/local/Cellar/python3/3.6.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --in
==> /usr/local/Cellar/python3/3.6.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --in
==> /usr/local/Cellar/python3/3.6.3/bin/python3 -s setup.py --no-user-cfg install --force --verbose --in
Last 15 lines from /Users/thomas/Library/Logs/Homebrew/python3/post_install.03.python3:
writing requirements to wheel.egg-info/requires.txt
writing top-level names to wheel.egg-info/top_level.txt
reading manifest file 'wheel.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'wheel/*.txt'
warning: no files found matching '*.py' under directory 'wheel/test'
warning: no files found matching 'wheel/test/test-1.0-py2.py3-none-win32.whl'
warning: no files found matching 'wheel/test/headers.dist/header.h'
warning: no files found matching 'wheel/test/pydist-schema.json'
no previously-included directories found matching 'wheel/test/*/dist'
no previously-included directories found matching 'wheel/test/*/build'
writing manifest file 'wheel.egg-info/SOURCES.txt'
running install_lib
copying build/lib/wheel/metadata.py -> /usr/local/lib/python3.6/site-packages/wheel
error: could not delete '/usr/local/lib/python3.6/site-packages/wheel/metadata.py': Permission denied
READ THIS: https://docs.brew.sh/Troubleshooting.html
These open issues may also help:
rtv: fix update to version 1.19.0 https://github.com/Homebrew/homebrew-core/pull/19807
dxpy 0.225.0 and TLS 1.2 fix https://github.com/Homebrew/homebrew-core/pull/19515
Formulae affected by Homebrew/brew#2482 https://github.com/Homebrew/homebrew-core/issues/13133
Python IDLE crash on start when using Open With https://github.com/Homebrew/homebrew-core/issues/18406
insighttoolkit: migrate from homebrew-science https://github.com/Homebrew/homebrew-core/pull/18180
Xdot https://github.com/Homebrew/homebrew-core/issues/19187
pipenv 8.2.6 (new formula) https://github.com/Homebrew/homebrew-core/pull/19060
I am running macOS High Sierra.
brew doctor result:
Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile
try
sudo chown -R $(whoami) /usr/local/lib/python3.6/site-packages
error: could not delete '/usr/local/lib/python3.6/site-packages/wheel/metadata.py': Permission denied
So what he said.
Most helpful comment
try
sudo chown -R $(whoami) /usr/local/lib/python3.6/site-packages