2
I am trying to clean up the various Python installations on my MacBook Pro (macOS 10.13.4) by removing everything except the original system python (2.7.2 for the current version of macOS). I have had installations from python.org, macports, and homebrew at one time or another, and I think I have been able to delete everything these installations touched, but my system python still yells at me when I try to install a module.
After removing the homebrew python and pip installations, and deleting old folders from the macports install, I updated my ~/.bash_profile to contain just my .bashrc config and iTerm2 utilities. I then installed PIP for the system python using easy_install. However, when I try to install a package, for instance voltron, I get the following errors, and the installation does not finish.
matplotlib 1.3.1 requires nose, which is not installed.
python-dateutil 2.6.1 has requirement six>=1.5, but you'll have six 1.4.1 which is incompatible.
prompt-toolkit 1.0.15 has requirement six>=1.9.0, but you'll have six 1.4.1 which is incompatible.
blessed 1.14.2 has requirement six>=1.9.0, but you'll have six 1.4.1 which is incompatible.
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 which is incompatible.
which python
returns /usr/bin/python
and which pip
returns /usr/local/bin/pip
I would like to get my computer back to the state it was in when it came out of the box, but I do not want to do a wipe-and-reinstall. I have tried using macOS Recovery Mode to reinstall macOS, but it didn't change the error, so it seems there are some lingering references to these packages somewhere. How can I restore the original state of Python?
$> pip -V
pip 10.0.0b2 from /Library/Python/2.7/site-packages/pip-10.0.0b2-py2.7.egg/pip (python 2.7)
Looks like it actually did end up installing Voltron, but it is still showing an error for the missing dependencies. Here is what happens when I try installing one of them (six, in this case)
$> pip install --user six
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.4.1)
python-dateutil 2.6.1 has requirement six>=1.5, but you'll have six 1.4.1 which is incompatible.
prompt-toolkit 1.0.15 has requirement six>=1.9.0, but you'll have six 1.4.1 which is incompatible.
blessed 1.14.2 has requirement six>=1.9.0, but you'll have six 1.4.1 which is incompatible.
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 which is incompatible.
Update - value of sys.path
$> python -c "import os, sys; print(os.linesep.join(sys.path))"
/Library/Python/2.7/site-packages/pip-10.0.0b2-py2.7.egg
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/Users/emroch/Library/Python/2.7/lib/python/site-packages
/Library/Python/2.7/site-packages
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC
>
sudo pip install voltron
" or "I enterpip install --user voltron
") and the complete output of the command. 2. What does$ pip -V
return?I've edited the post. Voltron ended up installing, but I'm still seeing errors. I would really like to be able to reset everything that has been changed about python on my mac... I can reinstall any of the extra packages as I need them – Eric Roch – 2018-04-13T20:05:33.143