1

I tried to use the Coursera course downloader from here and it worked for few courses but not all. They have recommended to use Python3.X. So I uninstalled Anaconda (version 2) from my Mac and installed Python3.5.1 from Python's website but still the course downloaders did not work as it was using default Python 2.7.

So I deleted Python from /usr/local/lib and now nothing is working. When I do which python it shows ``usr/local/bin/pythonand bothpythonandpython3` runs.

But when I do pip install coursera it throws error as follows:

Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

And when I do sudo easy_install pip, I get the following error.

Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 5, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
chintan s
  • 5,052
  • 13
  • 40
  • 71

2 Answers2

0

try Homebrew http://brew.sh/

brew install python3

curl bootstrap.pypa.io/get-pip.py | python3
SAF
  • 199
  • 1
  • 12
0

Your Mac should have Python 2 and Python 3 installed by default. in the terminal "python" will launch Python2, "python3" will launch Python3. With Anaconda you could have just kept the Python 2 version and created an environment for Python 3, http://conda.pydata.org/docs/using/envs.html#managing-environments.

This is the solution you will most likely need, No module named pkg_resources. Setuptools is causing the issue and you will need to wget ez_setup.py. Reinstalling Anaconda will save you a lot of time and pain.

Community
  • 1
  • 1
John Morrison
  • 3,150
  • 1
  • 13
  • 14