pipenv install --two always deletes virtualenv
See original GitHub issueI want to make a small script that automates running something that needs python2 with pipenv. I would do:
pipenv install --two
pipenv run hello.py
The first invocation is fine, the second time I run this script however it says:
Virtualenv already exists!
Removing existing virtualenv...
Creating a virtualenv for this project...
even though nothing has changed. It’s the --two option that causes this. If I remove that option it behaves as I would expect and reuses the old virtualenv, however then I get python3.
Since python3 is the default you don’t need --two/–three, so then you don’t have this problem.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
How to remove a virtualenv created by "pipenv run"
You can run the pipenv command with the --rm option as in: pipenv --rm. This will remove the virtualenv created for you under...
Read more >Frequently Encountered Pipenv Problems - Read the Docs
The workaround is to set the following two environment variables to a standard localization format: LC_ALL; LANG. For Bash, for example, you can...
Read more >Manage Virtual Environments - menziess blog
This way you always delete the virtual environment along with your project when you're done. And the python installation can easily be selected...
Read more >pipenv Documentation
Pipenv uses two files to do this: Pipfile and Pipfile.lock (which will look ... Will create a virtual env and install dependencies (if...
Read more >Pipenv: Sacred Marriage of Pipfile, Pip, & Virtualenv
lock instead, which is superior for basic use cases. Hashes are used everywhere, always. Security. Install Pipenv Today!¶. $ pip install 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
I guess what I wanted to happen was say
pipenv install
on my CI server and have a way to ensure it chooses the correct version of python, if the env didnt exist it might grab the system version first because it finds it on the path first, which is bad, but if a virtualenv already exists with that version, I don’t want it to destroy it. With the existing behaviors I am not sure how to make that happen.I’d like to second the intuition that even explicit arguments won’t repeat work unnecessarily.