Similar python 2.7 install problem

206 views
Skip to first unread message

jgro...@gmail.com

unread,
Oct 13, 2017, 6:41:39 PM10/13/17
to pymarc Discussion
My install problem is similar to Heidi's from Aug. 4, but alas, not the same.  Following Ed's advice to her (and an initial OS error suggesting the -H option) I entered

sudo -H pip install pymarc


only to get the dump below.  I'd be grateful for help. FWIW, I'm running sierra.  Thanks.

Jeff



$ sudo -H pip install pymarc

Collecting pymarc

  Downloading pymarc-3.1.7.tar.gz (211kB)

    100% |████████████████████████████████| 215kB 2.5MB/s 

Collecting six>=1.9.0 (from pymarc)

  Downloading six-1.11.0-py2.py3-none-any.whl

Installing collected packages: six, pymarc

  Found existing installation: six 1.4.1

    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.

    Uninstalling six-1.4.1:

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 778, in install

    requirement.uninstall(auto_confirm=True)

  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall

    paths_to_remove.remove(auto_confirm)

  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove

    renames(path, new_path)

  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 267, in renames

    shutil.move(old, new)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move

    copy2(src, real_dst)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2

    copystat(src, dst)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat

    os.chflags(dst, st.st_flags)

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

Edward Summers

unread,
Oct 14, 2017, 6:20:31 AM10/14/17
to pym...@googlegroups.com
Hi Jeff,

It looks like this is an issue with the version of Python shipped with El Capitan [1]. Apple don’t want to allow folks to mess up the Python that ships with OS X since it is used by the operating system. But it is kinda annoying, right?

I think you could try a few different approaches to solving this problem:

1) Upgrade to Sierra and see if the problem goes away.

2) Install a new Python that you can use (pymarc works with Python3). I would recommend installing Python3 with homebrew, but you can also download an installer.

3) Start using pipenv to manage a local python environment. You could install pymarc into this environment and use it for whatever development you are doing.

4) Follow the instructions at [1] to try to install pymarc without upgrading six: pip install twarc --upgrade --ignore-installed six

Personally I would probably go with 1 first because it’s good to keep the operating system up to date. But 4) might be the best thing to try if you are looking for a quick solution. 2 and 3 are more about how to do development with Python, but perhaps you may not be interested in diving into those things right now.

If you have any questions about any of these options please ask!

//Ed

[1] https://stackoverflow.com/questions/33185147/on-os-x-el-capitan-i-can-not-upgrade-a-python-package-dependent-on-the-six-compa#33599105
> --
> You received this message because you are subscribed to the Google Groups "pymarc Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pymarc+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

signature.asc
Reply all
Reply to author
Forward
0 new messages