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.

Support the --system flag in `pipenv run`

See original GitHub issue
Is your feature request related to a problem? Please describe.

When using pipenv in a docker container you can install dependencies using the --system flag. However if you use pipenv run in the docker container it will automatically create a virtualenv and there is no way to stop this - this entails installing pip and wheel inside the container, which in specific environments may not be possible or may take a long time.

Describe the solution you’d like

Provide a --system flag to pipenv run that skips the creation of a virtualenv and instead uses the system default.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:15
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
orfcommented, Aug 2, 2018

All in all it’s just a bit inconsistent. You can take advantage of the Pipfile (or specifically the Pipfile.lock) to install system dependencies, but you cannot make use of [scripts] to run commands in the system interpreter for no clear reason.

Not to mention you might have a system command in [scripts] that doesn’t even depend on Python, perhaps one to build documentation with a go project. It would be nice to skip the install phase for this.

Having said that perhaps --system is a bad name for the flag, maybe --skip-virtualenv?

3reactions
orfcommented, Aug 2, 2018

Having the commands defined in the Pipfile has it’s advantages. We have a prod and dev command defined so our base docker image just executes pipenv run prod. This is quite nice as the commands are in a single place and anyone can get working, plus the docker image just needs to run a single command for all projects so less duplication.

Also in our case pipenv run dev executes pipenv run prod with some extra development specific arguments.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Usage of Pipenv - Read the Docs
You can tell Pipenv to install a Pipfile's contents into its parent system with the --system flag: $ pipenv install --system.
Read more >
Pipenv install with all the flags, explained - Micah Smith
--system : this flag means that dependencies will be installed to the system Python; no virtual environment will be created. --deploy : ...
Read more >
pipenv Documentation - Read the Docs
Once you have pipx ready on your system, continue to install Pipenv: ... On Windows you can find the user base binary directory...
Read more >
Advanced Usage of Pipenv — pipenv 11.7.2 documentation
To reuse Conda–installed Python packages, use the --site-packages flag: ... cat .env HELLO=WORLD⏎ $ pipenv run python Loading .env environment variables…
Read more >
pipenv Documentation - manpages.ubuntu!
To initialize a Python 3 virtual environment, run $ pipenv --three. ... things into its parent system with the --system flag: $ pipenv...
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