我正在尝试从github的flask应用程序安装-r requirements.txt

时间:2019-12-04 20:50:14

标签: python python-3.x

我一直收到以下错误:

ERROR: Command errored out with exit status 1:
 command: /Users/felipeveraloza/Desktop/flask-aws-tutorial/flask-aws/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_d/tpx546q90svbs7y84bgplfpm0000gn/T/pip-install-qql4powj/distribute/setup.py'"'"'; __file__='"'"'/private/var/folders/_d/tpx546q90svbs7y84bgplfpm0000gn/T/pip-install-qql4powj/distribute/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/_d/tpx546q90svbs7y84bgplfpm0000gn/T/pip-install-qql4powj/distribute/pip-egg-info
     cwd: /private/var/folders/_d/tpx546q90svbs7y84bgplfpm0000gn/T/pip-install-qql4powj/distribute/
Complete output (10 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/_d/tpx546q90svbs7y84bgplfpm0000gn/T/pip-install-qql4powj/distribute/setuptools/__init__.py", line 2, in <module>
    from setuptools.extension import Extension, Library
  File "/private/var/folders/_d/tpx546q90svbs7y84bgplfpm0000gn/T/pip-install-qql4powj/distribute/setuptools/extension.py", line 2, in <module>
    from setuptools.dist import _get_unpatched
  File "/private/var/folders/_d/tpx546q90svbs7y84bgplfpm0000gn/T/pip-install-qql4powj/distribute/setuptools/dist.py", line 103
    except ValueError, e:
                     ^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

2 个答案:

答案 0 :(得分:0)

您尝试了吗?

$ pip install -r requirements.txt

答案 1 :(得分:0)

我要指定您使用的Pip版本。 Mac默认为python 2.7 ...在您的情况下,我将以“ pip3”的身份运行命令,因此在您的情况下...

pip3 install -r requirements.txt