0

I am trying to install Mercurial 3.4.2 for mac with code:

 pip install mercurial==3.4.2

But have an error:

 Collecting mercurial==3.4.2
Installing collected packages: mercurial
Found existing installation: mercurial 3.9.1
  DEPRECATION: Uninstalling a distutils installed project (mercurial) 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 mercurial-3.9.1:
Exception:
Traceback (most recent call last):
 File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 736, in install
requirement.uninstall(auto_confirm=True)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 742, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
 File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 303, in move
  os.unlink(src)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/mercurial-3.9.1-py2.7.egg-info'

Can anyone help me with that thing?

sffsf
  • 55
  • 5

1 Answers1

0

This solution as helpful for me:

sudo chown -R $(whoami) $(brew --prefix)/*
Yaakov Bressler
  • 9,056
  • 2
  • 45
  • 69