0

I am still pretty new to python, and I need html5lib for a project, but when I run pip install html5lib, here's what I get:

Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.py', '/var/folders/yr/8762117x5h7_pwb9fx5f0tzr0000gn/T/pip-uiZ0aQ-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.py', "[Errno 1] Operation not permitted: '/var/folders/yr/8762117x5h7_pwb9fx5f0tzr0000gn/T/pip-uiZ0aQ-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', '/var/folders/yr/8762117x5h7_pwb9fx5f0tzr0000gn/T/pip-uiZ0aQ-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.pyc', "[Errno 1] Operation not permitted: '/var/folders/yr/8762117x5h7_pwb9fx5f0tzr0000gn/T/pip-uiZ0aQ-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', '/var/folders/yr/8762117x5h7_pwb9fx5f0tzr0000gn/T/pip-uiZ0aQ-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/var/folders/yr/8762117x5h7_pwb9fx5f0tzr0000gn/T/pip-uiZ0aQ-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', '/var/folders/yr/8762117x5h7_pwb9fx5f0tzr0000gn/T/pip-uiZ0aQ-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/var/folders/yr/8762117x5h7_pwb9fx5f0tzr0000gn/T/pip-uiZ0aQ-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', '/var/folders/yr/8762117x5h7_pwb9fx5f0tzr0000gn/T/pip-uiZ0aQ-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/var/folders/yr/8762117x5h7_pwb9fx5f0tzr0000gn/T/pip-uiZ0aQ-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]

Really long gross error, I know, but I'm not sure what is going on. I've actually had errors trying to install other python packages as well and I am not sure what the problem is. Any help or insight would be greatly aprecaited, thanks!

DYZ
  • 55,249
  • 10
  • 64
  • 93
  • You do not have proper permissions to modify the system files. Need to run the command as superuser (on Mac/Linux) or admin (on Windows). – DYZ May 12 '17 at 00:23

2 Answers2

0

I think you're on a Mac.

And it smells like you are trying to install into the system-level Python directories without being root (hence, "Operation not permitted.")

See if you have the "virtualenv" command on your system (you probably do), and then read up on that for how to use it. (You really want it.)

Chris Curvey
  • 9,738
  • 10
  • 48
  • 70
  • Ok so I have tried enabling root user which did not work, and when I tried `pip install virtualenv` I get another error: `IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/virtualenv.py'`. I have seen this same error trying to install other packages. – Henry Soule May 12 '17 at 01:48
  • And yes, I am on a mac, using OSX El Capitan. – Henry Soule May 12 '17 at 01:52
0

Upgrade your pip with

pip install --upgrade pip    

And then follow the instructions on : https://apple.stackexchange.com/questions/209572/how-to-use-pip-after-the-os-x-el-capitan-upgrade

eli-bd
  • 1,533
  • 2
  • 17
  • 35