python - 使用ez_setup.py安装setuptools出错
ringa_lee
ringa_lee 2017-04-17 14:54:40
[Python讨论组]

Windows环境,Python2.7,

python ez_setup.py
Extracting in c:\users\admini~1\appdata\local\temp\tmpmnv_4n
Now working in c:\users\admini~1\appdata\local\temp\tmpmnv_4n\setuptools-15.1
Installing Setuptools
Traceback (most recent call last):
File "setup.py", line 21, in
exec(init_file.read(), command_ns)
File "", line 11, in
File "c:\users\admini~1\appdata\local\temp\tmpmnv_4n\setuptools-15.1\setuptool
s__init__.py", line 11, in
from setuptools.extension import Extension
File "c:\users\admini~1\appdata\local\temp\tmpmnv_4n\setuptools-15.1\setuptool
s\extension.py", line 8, in
from .dist import _get_unpatched
File "c:\users\admini~1\appdata\local\temp\tmpmnv_4n\setuptools-15.1\setuptool
s\dist.py", line 19, in
import pkg_resources
File "c:\users\admini~1\appdata\local\temp\tmpmnv_4n\setuptools-15.1\pkg_resou
rces__init__.py", line 83, in
import pkg_resources._vendor.packaging.specifiers
File "c:\users\admini~1\appdata\local\temp\tmpmnv_4n\setuptools-15.1\pkg_resou
rces_vendor\packaging\specifiers.py", line 274, in
class Specifier(_InpidualSpecifier):
File "c:\users\admini~1\appdata\local\temp\tmpmnv_4n\setuptools-15.1\pkg_resou
rces_vendor\packaging\specifiers.py", line 373, in Specifier
re.VERBOSE | re.IGNORECASE,
File "F:\python\lib\re.py", line 190, in compile
return _compile(pattern, flags)
File "F:\python\lib\re.py", line 242, in _compile
raise error, v # invalid expression
sre_constants.error: nothing to repeat
Something went wrong during the installation.
See the error message above.

ringa_lee
ringa_lee

ringa_lee

全部回复(2)
天蓬老师

感觉是 Python 的Bug, 请用重新下载 Python27 的最新版安装。
另外,保证 ez_setup.py 最新。
如果需要 pip,可以直接使用 https://bootstrap.pypa.io/get-pip.py,pip 自带了 setuptools。

巴扎黑

我觉得你需要使用pip, 最新的Python2和Python3都自带了pip,
Windows环境下

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号