-3

sudo -H pip install netmiko

Collecting netmiko:

----
----
Installing collected packages: setuptools, idna, ipaddress, enum34, cryptography, paramiko, scp, pyyaml, netmiko
 Found existing installation: setuptools 1.1.6
 Uninstalling setuptools-1.1.6:
Exception:
Traceback (most recent call last):
 File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main
 status = self.run(options, args)
 File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run
 prefix=options.prefix_path,
 File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install
 requirement.uninstall(auto_confirm=True)
 File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall
 paths_to_remove.remove(auto_confirm)
 File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
 renames(path, new_path)
 File "/Library/Python/2.7/site-packages/pip-8.1.2-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 299, in move
 copytree(src, real_dst, symlinks=True)
 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
 raise Error, errors
Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/tmp/pip-pmkwdi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', "[Errno 1] Operation not permitted: '/tmp/pip-pmkwdi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/tmp/pip-pmkwdi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-pmkwdi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/tmp/pip-pmkwdi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/tmp/pip-pmkwdi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/tmp/pip-pmkwdi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-pmkwdi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/tmp/pip-pmkwdi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/tmp/pip-pmkwdi-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]
Gryu
  • 2,102
  • 2
  • 16
  • 29
RPPA
  • 3
  • 1
  • 3
  • 1
    if you look at errors you can see the problem. `"Operation not permitted:"` try `sudo pip install netmiko` – hzleonardo Jun 14 '16 at 00:02
  • @hzleonardo: Thanks for pointing that out. I have tried with sudo permissions as well but it is giving the same error on tmp directory. Can't figure out why. Changed original post with sudo. – RPPA Jun 14 '16 at 00:17
  • which os are you on? you can try with brew, `brew install netmiko` – hzleonardo Jun 14 '16 at 00:33
  • I am on Mac OSX. Getting error on brew may require download. $ brew install netmiko Error: No available formula with the name "netmiko" ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... Error: No formulae found in taps. – RPPA Jun 14 '16 at 00:54
  • check here: http://stackoverflow.com/questions/10937806/oserror-error-1-operation-not-permitted. but I need to say, I do not recommend to change system files. You can check and try fixes in this link, good luck. – hzleonardo Jun 14 '16 at 01:04

1 Answers1

1

Yes, I would first decouple from the MacOS system Python (i.e. install a separate Python from the system Python).

http://docs.python-guide.org/en/latest/starting/install/osx/

Then install Netmiko using that Python (or install it inside a virtualenv).

If you are still having issues, create an issue on the Netmiko GitHub page.

Kirk Byers
  • 499
  • 3
  • 7