安装requirements.txt错误

时间:2020-06-11 17:14:43

标签: python python-3.x pip

运行pip install -r requirements.txt时安装失败,并显示以下错误:

  Running setup.py install for parse ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aaopnw0k/parse/setup.py'"'"'; __file__='"'"'/tmp/pip-install-aaopnw0k/parse/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-r_rs8btw/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-aaopnw0k/parse/
    Complete output (9 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib
    copying parse.py -> build/lib
    running install_lib
    copying build/lib/parse.py -> /usr/local/lib/python3.6/site-packages
    error: could not create '/usr/local/lib/python3.6/site-packages/parse.py': Permission denied
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aaopnw0k/parse/setup.py'"'"'; __file__='"'"'/tmp/pip-install-aaopnw0k/parse/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-r_rs8btw/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

这是什么意思,我如何成功安装我的要求?

1 个答案:

答案 0 :(得分:0)

尝试使用以下命令sudo pip/pip3 -r requirements.txt