Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: cryptography requires setuptools 18.5 or newer, please upgrade to a newer version of setuptools #220

Open
0xn0ne opened this issue Jul 6, 2019 · 6 comments

Comments

@0xn0ne
Copy link

0xn0ne commented Jul 6, 2019

部署方式:docker
解决方法:
在 requirements.txt 第一行加上 setuptools=>18.5 或在 Dockerfile 中加入 RUN pip install setuptools=>18.5,保证这条命令在 pip install -r requirements.txt 之前执行即可

image

项目很棒!虽然报错但是目前使用没发现问题,未防后续引起其它bug,先提醒一下

@threedr3am
Copy link

Step 12/18 : RUN set -x     && pip install -r /opt/xunfeng/requirements.txt     && ln -s /usr/lib/x86_64-linux-gnu/libpcap.so /usr/lib/x86_64-linux-gnu/libpcap.so.1
 ---> Running in 7fccca54876a
+ pip install -r /opt/xunfeng/requirements.txt
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 262, in run
    for req in parse_requirements(filename, finder=finder, options=options, session=session):
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1632, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 173, in from_line
    return cls(req, comes_from, url=url, prereleases=prereleases)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 71, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2667, in parse
    reqs = list(parse_requirements(s))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2605, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2573, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'setuptools=>18.5', 'at', '=>18.5')

Storing debug log for failure in /root/.pip/pip.log
The command '/bin/sh -c set -x     && pip install -r /opt/xunfeng/requirements.txt     && ln -s /usr/lib/x86_64-linux-gnu/libpcap.so /usr/lib/x86_64-linux-gnu/libpcap.so.1' returned a non-zero code: 2

@threedr3am
Copy link

依然报错

@0xn0ne
Copy link
Author

0xn0ne commented Aug 21, 2019

依然报错

em..那你别加版本号,直接添加setuptools,或者手动 pip install setuptools

@threedr3am
Copy link

多加一行pip install setuptools --upgrade就好了

@threedr3am
Copy link

🐂🍺🐂🍺

@0xn0ne
Copy link
Author

0xn0ne commented Aug 24, 2019

🐂🍺🐂🍺

hhhh...希望他们能早点修复这个不算什么问题的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants