简体   繁体   English

尝试安装html5lib时出错

[英]Error when trying to install html5lib

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: 我对python还是很陌生,我需要一个项目的html5lib,但是当我运行pip install html5lib ,这是我得到的:

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.frame 错误:[('/ 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]不允许的操作:'/ 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]不允许的操作:'/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.frame work/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/_marker work / 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]不允许的操作:'/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',“ [错误1]不允许的操作:'/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/_marker lib', '/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'")] lib”,“ / var / folders / yr / 8762117x5h7_pwb9fx5f0tzr0000gn / T / pip-uiZ0aQ-uninstall / System / Library / Frameworks / Python.framework / Versions / 2.7 / Extras / lib / python / _markerlib”,“ [错误1]操作不允许:'/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. 我实际上在尝试安装其他python软件包时也遇到了错误,我不确定是什么问题。 Any help or insight would be greatly aprecaited, thanks! 非常感谢您的任何帮助或见解!

I think you're on a Mac. 我认为您使用的是Mac。

And it smells like you are trying to install into the system-level Python directories without being root (hence, "Operation not permitted.") 而且它闻起来像是您试图在没有root用户的情况下安装到系统级的Python目录中(因此,“不允许操作”。)

See if you have the "virtualenv" command on your system (you probably do), and then read up on that for how to use it. 查看您的系统上是否有“ virtualenv”命令(您可能有),然后阅读该命令以了解如何使用它。 (You really want it.) (您真的想要它。)

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 然后按照以下说明进行操作: https : //apple.stackexchange.com/questions/209572/how-to-use-pip-after-the-os-x-el-capitan-upgrade

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM