learner
learner

Reputation: 308

Import setuptools fails

I am trying to install some packages using pip on OSX 10.11.6 and it is always failing.

Whenever I try to install some package I am getting the error about missing extern. I have tried to fix the extern thing by ImportError: No module named extern but without success.

Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    from setuptools import setup
  File "build/bdist.macosx-10.11-intel/egg/setuptools/__init__.py", line 10, in <module>
  File "build/bdist.macosx-10.11-intel/egg/setuptools/extern/__init__.py", line 1, in <module>
ImportError: No module named extern

I have tried deleting all my setuptools file and in /Library/Python/2.7/site-packages/ and reinstalling but it doesn't work still.

Upvotes: 1

Views: 2560

Answers (1)

learner
learner

Reputation: 308

The issue of the problem was different version of distribute was troubling my installation.

I went to my python package directory

 /Library/Python/2.7/site-packages

and fixed the problem by running the following command. I reverted my installation back to distribute_0.6.14 via

python distribute_setup.py

This fixed my setuptools and now I am able to install and run things normally.

Upvotes: 1

Related Questions