How can I get a predictable virtualenv dirname?
See original GitHub issueMy environment
- Ubuntu 16.04.3 LTS
- Python version: Python 2.7.12
- Pipenv version: pipenv, version 8.3.2
What confused me?
$ echo $WORKON_HOME
/home/wonder/PyEnvs
$ pipenv --where
/home/wonder/workspace/myproj
$ pipenv --venv
/home/wonder/PyEnvs/myproj-BKbQCeJj
Why is BKbQCeJj
in my virtualenv dirname? Can it be predictable? And can I custom it to be simply myproj
?
Why it is a problem?
The Autocomplete-Python plugin of Atom needs to know the Python executable paths to work properly with every individual project.
I’ve been using virutalenvwrapper, which gives me predictable path names, So I can pass /home/wonder/PyEnvs/$PROJECT_NAME/bin/python
to Autocomplete-Python
, let it find the right python path for a project.
Now with pipenv’s postfixed paths, Autocomplete-Python
stopped working. So any helps?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:16
- Comments:24 (13 by maintainers)
Top Results From Across the Web
Renaming a virtualenv folder without breaking it - Stack Overflow
This will make some of the files created by setuptools or distribute use relative paths, and will change all the scripts to use...
Read more >Python virtualenv and venv dos and don'ts - InfoWorld
This can have unpredictable effects on imports later. Use a name that describes your project unambiguously.
Read more >Trying to come up with a default directory name for virtual ...
The question On Twitter I asked people for suggestions for an environment variable name to store the default/typical name they use for ...
Read more >Using virtualenv to Manage Your Own Python Environment
Create a virtual environment with a new directory name, such as ~/myenv . The virtualenv tool will create the directory for you.
Read more >Tips and Tricks — virtualenvwrapper 4.8.5.dev15 documentation
Justin Abrahms posted about some code he added to his shell environment to look at the directory each time he runs cd ....
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
We’re not changing our approach here.
I wholeheartedly agree that
PIPENV_VENV_IN_PROJECT
should be default! The name and location are always predictable, its just<project root>/.venv
.