Support the --system flag in `pipenv run`
See original GitHub issueIs 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:
- Created 5 years ago
- Reactions:15
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
All in all it’s just a bit inconsistent. You can take advantage of the
Pipfile
(or specifically thePipfile.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 ago
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
?Having the commands defined in the
Pipfile
has it’s advantages. We have aprod
anddev
command defined so our base docker image just executespipenv 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
executespipenv run prod
with some extra development specific arguments.