0

When running pip install -r requirements.txt the installation fails with this error:

  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.

What does it mean and how do I successfully install my requirements?

runnerpaul
  • 5,942
  • 8
  • 49
  • 118

1 Answers1

0

Try using the following command sudo pip/pip3 -r requirements.txt

AkIonSight
  • 365
  • 3
  • 13
  • 2
    No, don't do that. Check out e.g. [Is it acceptable and safe to run pip install under sudo?](https://stackoverflow.com/q/15028648/2650249) or [Stop using sudo pip install](https://dev.to/elabftw/stop-using-sudo-pip-install-52mn) – hoefling Jun 11 '20 at 17:43