试图安装Python的html5lib我得到“python setup.py egg_info”失败,错误代码为1

时间:2016-08-08 18:55:45

标签: python pip

为了安装Python的'html5lib',我安装了最新版本的setuptools:

sudo pip install setuptools --upgrade

它已安装:

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Collecting setuptools
Downloading setuptools-25.1.6-py2.py3-none-any.whl (442kB)
100% |████████████████████████████████| 450kB 658kB/s
Installing collected packages: setuptools
Found existing installation: setuptools 0.6c12dev-r85381
  Uninstalling setuptools-0.6c12dev-r85381:
  Successfully uninstalled setuptools-0.6c12dev-r85381
Successfully installed setuptools-25.1.6

但是当我尝试安装'html5lib'时:

wanzos-Mac-mini:python wanzo$ pip install html5lib
Collecting html5lib
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached html5lib-0.999999999.tar.gz
Complete output from command python setup.py egg_info:
html5lib requires setuptools version 18.5 or above; please upgrade before installing (you have 0.6c12)

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/vg/h8_286qs7cq4rcr2jfgdqb2h0000gn/T/pip-build-4h6oAR/html5lib/

返回“python setup.py egg_info”失败,错误代码为1“ Python版本为2.7.1和19.01.2012 Build for Mac OS X.

使用这个配置,我没有遇到安装'lxml'的问题,并且它与我尝试过的所有脚本都运行良好。唯一的问题是当我尝试安装'html5lib'

要安装它,我尝试了“easy_install”,但我得到了这个:

wanzos-Mac-mini:python wanzo$ sudo -H pip install easy_install
Collecting easy_install
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Could not find a version that satisfies the requirement easy_install (from versions: )
No matching distribution found for easy_install
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning

我无法安装'html5lib'任何帮助表示赞赏。感谢。

0 个答案:

没有答案