1

I am using pyproject.toml to configure black. However, when this file is added, pip3 install -e . --user fails with the following error:

 ERROR: Complete output from command /usr/bin/python3 -c 'import setuptools, tokenize;__file__='"'"'/home/sean/git/auto-md/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=: ERROR: usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: -c --help [cmd1 cmd2 ...] or: -c --help-commands or: -c cmd --help error: option --user not recognized ---------------------------------------- ERROR: Command "/usr/bin/python3 -c 'import setuptools, tokenize;__file__='"'"'/home/sean/git/auto-md/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=" failed with error code 1 in /home/sean/git/auto-md/ 

Why is this error occuring and how can I resolve it?

1 Answer 1

6

According to the discussion in this GitHub issue, to resolve this issue, you need to run pip3 install -e . --user --no-use-pep517.

The reasons for this are complicated, but essentially:

  1. By using pyproject.toml, you're indicating to pip that you should use the new pep517 installation process.

  2. pep517 does not support -e or --user, so it fails.

  3. There is no other way to automatically configure black, so you're stuck with pyproject.toml and --no-use-pep517.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.