question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"pipenv run" intercepts its command-line options when specified after command

See original GitHub issue
hobbes:backend cdunklau$ pipenv run pip --help
Usage: pipenv run [OPTIONS] COMMAND [ARGS]...

  Spawns a command installed into the virtualenv.

Options:
  --three / --two  Use Python 3/2 when creating virtualenv.
  --python TEXT    Specify which version of Python virtualenv should use.
  -h, --help       Show this message and exit.

…that should have been the help for pip, but I got pipenv run’s help.

Looks like this comes down to how click handles things. The workaround is simply to use --. Both pipenv run -- pip --help and pipenv run pip -- --help give me pip’s help output. This also appears to happen for the other pipenv run options: --two, --three, and --python.

I’d expect at least a mention in the pipenv run help output about this, if preventing click’s normal behavior isn’t feasible.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
cdunklaucommented, Oct 18, 2017

The click docs point this feature out. I’m 95% sure this thing is what’s needed, unfortunately I don’t have enough time to investigate the effects WRT pipenv. There’s a nice example there though.

1reaction
nateprewittcommented, Oct 28, 2017

@jacebrowning, 8.3.0 is now released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to intercept "pipenv install" spinner-like output messages ...
0) command run via subprocess.Popen as the output is produced, i.e. not when the whole process has ended, because depending on the amount...
Read more >
Pipenv run vs Pipenv shell - Anselmos Blog
Pipenv run is the main purpose for running next python commands. It will automatically activate environment for that command and execute ...
Read more >
Pyenv and Pipenv (on MacOS) – Index - Wilson Mar
Commands for the operating system to execute “python3” are intercepted by a shim executable which passes commands along to the actual Python ...
Read more >
Pipenv CLI Reference - Python Packaging Authority
Uninstalls all packages not specified in Pipfile.lock. pipenv ... You can temporarily override it, for example: ... pipenv run [OPTIONS] COMMAND [ARGS].
Read more >
Managing Version, Virtual Environments and Dependencies ...
But instead of accessing this file directly, you should use the command poetry config and its subcommands. To list the settings, run: $...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found