I want to clean up my installations on my MacBook Pro at the moment. In the past, I have installed things like homebrew, pip, python, nnpm and some other things that I don't even remember.
Recently, I tried to install the OpenCV package, but was met with some errors, which led my to try to update pip, which lead me to some permission errors. Looking around stackoverflow, I tried to change some permissions of the files and folders involved:
sudo chmod -R 777 /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/EGG-INFO/
sudo chmod -R 777 /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/
Now, after running that last command and trying to update pip pip install --upgrade pip
, I get:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==9.0.1', 'console_scripts', 'pip')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2696, in load_entry_point
raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'pip') not found
In fact, anything to do with pip commands (e.g. pip -V
now give about the same error.
Now, I check /usr/local/bin
and see a huge mess of files.
To give you an idea: ls /usr/local/bin
returns
2to3 install-info pydoc3.6
2to3-3.6 makeinfo python3
R node python3-32
RemoteUpdateManager nosetests python3-config
Rscript nosetests-2.7 python3.6
SophosUpdate npm python3.6-32
VBoxAutostart npx python3.6-config
VBoxBalloonCtrl pdftexi2dvi python3.6m
VBoxBugReport pip python3.6m-config
VBoxDTrace pip2 pyvenv
VBoxHeadless pip2.7 pyvenv-3.6
VBoxManage pip3 sqlite3_analyzer
VBoxVRDP pip3.6 sweep
VirtualBox pod2texi tclsh8.6
brew prl_convert texi2any
chardetect prl_disk_tool texi2dvi
chromedriver prl_perf_ctl texi2pdf
easy_install-3.6 prlcore2dmp texindex
idle3 prlctl vbox-img
idle3.6 prlexec vboxwebsrv
info prlsrvctl wish8.6
infokey pydoc3
I see Multiple versions of the same things (like pip, pip2, pip2.7, pip3, pip3.6) for different installed programs on my computer.
.
What I would ultimately like to achieve is to clean and tidy up this mess, and uninstall all packages/programs I have previously installed that relates to pip, python, homebrew, nnpm and anything else related to these. After which, I would like to reinstall the things needed for me to run Python again, as well as install Python packages such as numpy, OpenCV, etc.
Also, if anyone could help me clear up and explain what the relationship between these things are (homebrew, pip, python, etc), it would help me understand this better and aid in my future practices of downloading and installing files/packages.