Add an equivalent of `workon` from virtualenvwrapper
See original GitHub issueWorkon does two things. When executed with no args, it lists all available projects (i.e. venvs).
More helpfully, it streamlines the activation process when opening a new shell. This is super useful if you have dozens of projects you work on regularly. A possible syntax for pipenv could look like this:
~ $ pipenv work
blog
django
requests
supersecretproject
pipenv
~ $ pipenv work requests
Moving you to the requests project and activating the shell
(requests) ~/code/requests $
(PS1’s might not be right for pipenv behaviour, but you get the idea.
This streamlines the developers’ flow from:
cd code/requests
pipenv shell
to just:
pipenv work requests
It’s a minor enhancement but something I’d miss moving from virtualenvwrapper.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:27
- Comments:27 (14 by maintainers)
Top Results From Across the Web
Installation — virtualenvwrapper 4.8.5.dev15 documentation
WORKON_HOME tells virtualenvwrapper where to place your virtual environments. The default is · $HOME/.virtualenvs . If the directory does not exist when ...
Read more >Virtualenvwrapper - Read the Docs
virtualenvwrapper is a set of extensions to Ian Bicking's virtualenv tool. The extensions include wrappers for creating and deleting virtual environments and ...
Read more >Command Reference - Virtualenvwrapper - Read the Docs
Create a new virtualenv in the WORKON_HOME directory. ... A unique virtualenv name is generated. If -c or --cd is specified the working...
Read more >Tips and Tricks — virtualenvwrapper 4.8.5.dev15 documentation
In the postmkvirtualenv script I have the following to create a directory based on the project name, add that directory to the python...
Read more >virtualenvwrapper Documentation
(env2)$ echo 'pip install sphinx' >> $WORKON_HOME/ ... Switch from a virtual environment to the system-installed version of Python. Syntax:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
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
@kennethreitz @fweidemann14 @kblicharski, I finally understood. Here is a short rosetta, for someone who is as new to pew and pipenv as me.
A few gotchas:
cdproject
equivalent from virtualenvwrapper is missing. Butpew setproject
can do the change to directory once.pew new
does not have a--system-site-packages
option. Instead there is a separatepew toggleglobalsitepackages
command.@kennethreitz Is this feature still a thing? I really love Pipenv and recently converted all my projects, but an equivalent to virtualenvwrapper’s
workon
would really add that last bit of luxury to it. You should consider adding it 😉