1

The issue began when I was trying to install twilio on my Mac with El Capitan 10.11.6.

I got this error:

    OSError: [Errno 1] Operation not permitted: '/tmp/pip-EmsRHo-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pyOpenSSL-0.13.1-py2.7.egg-info'

Research informed I should run pip install --ignore-installed six, which displayed the following error:

Exception:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/six.py'

Further research told me to run brew install python

I once again attempted to run pip install twilio

New error:

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/Users/rdacso/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 48, in <module>
    import six
ImportError: No module named six

I've attempted to pip install six, but continue to get this error:

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/Users/rdacso/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 48, in <module>
    import six
ImportError: No module named six

Everything appears borked as a result of not having module six. I cannot install or uninstall six. Even pip freeze displays the ImportError: No module named six.

jwodder
  • 54,758
  • 12
  • 108
  • 124
rdacso
  • 11
  • 4
  • Have you tried `pip install --ignore-installed six` after installing python with `brew`? – wpercy May 09 '17 at 20:33
  • @wpercy Yes. Same issue: `Rebeccas-MacBook-Pro:gardening rdacso$ pip install --ignore-installed six Traceback (most recent call last): File "/usr/local/bin/pip", line 6, in from pkg_resources import load_entry_point File "/Users/rdacso/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 48, in import six ImportError: No module named six` – rdacso May 09 '17 at 21:32

1 Answers1

0

Turns out when I ran brew install python I managed to install a second python library. This caused dueling pythons.

I ran brew uninstall python, reinstalled pip using easy_install pip, which gave me the ability to once again pip install six.

After this was completed, I was able to install twilio using easy_install twilio rather than pip install twilio.

rdacso
  • 11
  • 4