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

setup的代码有点问题,请修复 #16

Open
luckworld opened this issue May 21, 2020 · 1 comment
Open

setup的代码有点问题,请修复 #16

luckworld opened this issue May 21, 2020 · 1 comment

Comments

@luckworld
Copy link

requirements = [str(ir.req) for ir in parse_requirements("requirements.txt", session=False)]

if sys.version_info.major == 2:
requirements = [str(ir.req) for ir in parse_requirements("requirements-py2.txt", session=False)]

在代码环境是python2的时候,由于在py2下的没有req属性,在进if语句前,会直接抛异常,安装失败;可改成if-else结构

@only1zf
Copy link

only1zf commented Nov 17, 2020

command: /Users/user/miniconda3/envs/quant/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/h3/m_rgq1zj44s74nbzgwn9j0lh0000gn/T/pip-install-tmydcv0r/jqdatasdk/setup.py'"'"'; file='"'"'/private/var/folders/h3/m_rgq1zj44s74nbzgwn9j0lh0000gn/T/pip-install-tmydcv0r/jqdatasdk/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/h3/m_rgq1zj44s74nbzgwn9j0lh0000gn/T/pip-pip-egg-info-47je1kg3
cwd: /private/var/folders/h3/m_rgq1zj44s74nbzgwn9j0lh0000gn/T/pip-install-tmydcv0r/jqdatasdk/
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/h3/m_rgq1zj44s74nbzgwn9j0lh0000gn/T/pip-install-tmydcv0r/jqdatasdk/setup.py", line 27, in
requirements = [str(ir.req) for ir in parse_requirements("requirements.txt", session=False)]
File "/private/var/folders/h3/m_rgq1zj44s74nbzgwn9j0lh0000gn/T/pip-install-tmydcv0r/jqdatasdk/setup.py", line 27, in
requirements = [str(ir.req) for ir in parse_requirements("requirements.txt", session=False)]
AttributeError: 'ParsedRequirement' object has no attribute 'req'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

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