New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt Windows cmd prompt in pipenv launched shell #1036

Closed
dalito opened this Issue Nov 6, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@dalito

dalito commented Nov 6, 2017

The standard command prompt in windows (cmd.exe) does not indicate whether I am in an pipenv-shell or not.

  1. OS Type: Win 10
  2. Python version: 2.7.14
  3. Pipenv version: 8.3.2
c:\dev_src\_pyve>cd dev_py2
c:\dev_src\_pyve\dev_py2>pipenv shell
Launching subshell in virtual environment. Type 'exit' to return.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.
c:\dev_src\_pyve\dev_py2>exit
c:\dev_src\_pyve\dev_py2>

Here "dev_py2" was a pipenv-created environment with the pipfile(s).

It would be nice if pipenv could show the name of the active virtual env in the prompt like virtualenv does:

(dev_py2) c:\dev_src\_pyve\dev_py2
@techalchemy

This comment has been minimized.

Member

techalchemy commented Nov 8, 2017

@dalito This is currently unsupported because of the way we handle environments in windows. We don't activate the virtualenv at any point, we use subshells which are managed by pew. There are a bunch of reasons for this some of which involve the not insignificant amount of overhead involved in cross-platform path/dependency/subprocess/activation/execution management for a feature that we don't really think should be used that much.1 @erinxocon covered this a bit more in #880 so I'll go ahead and close this out for now, thanks for the feedback!

1: We intend for most things to be done using pipenv run <script> rather than the traditional approach of activating environments, since the whole point of using pipenv is that it manages the dependencies and the environment together, meaning you don't have to worry about where it is or how to access it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment