Trying to install tensor flow pip / easy_install both seem to have broken and I'm at a complete loss. Python (2.7.10) on the command line still seems to work. I don't really have anything worth keeping. Is there anyway to just reset (or delete) everything both and just use pip (or even docker) to try again?
Any ideas on the root cause? (I'm certainly not a python expert and was just going through the install set up here https://www.tensorflow.org/install/install_mac)
pip:
bcmp-air:tensor1 paullb$ pip
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
import packaging.requirements
File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)
And easy_install:
bcmp-air:tensor1 paullb$ easy_install
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 7, in <module>
from setuptools.command.easy_install import main
File "/Library/Python/2.7/site-packages/setuptools/__init__.py", line 12, in <module>
import setuptools.version
File "/Library/Python/2.7/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
import packaging.requirements
File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)
Tensorflow isn't my bag but I got myself into the same dependency hell by attempting to installing something with a fairly complex dependency graph, thereby unintentionally upgrading setuptools, on the system Python. IPython, in my case.
Alas. However. Nobody doing anything serious should be using the stale Mac system Python. Instead, install the most recent Python 2.x or 3.x (your preference) from https://www.python.org/downloads/mac-osx/ or your package manager (homebrew etc) of choice. That'll get you an up-to-date working Python with pip and all the fixings.
In addition, consider using virtual environments, which will insulate you not only from accidentally disrupting core libraries like this, but also avoid future dependency hells between your own various projects.
(For the record, I healed my system python by deleting pretty much everything suspect from /Library/Python/2.7/site-packages/
, reinstalling pip via the bootstrap script at https://bootstrap.pypa.io/get-pip.py, then using that to start force-downgrading libs until things worked. For me, a slightly older setuptools version helped. But that's not a long-term solution)