Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pipenv shell starts a CMD shell when run from powershell

See original GitHub issue

I use powershell as my primary shell, but pipenv shell starts a CMD prompt.

Describe you environment
  1. OS Type: Windows 7
  2. Python version: $ python -V 3.6.2
  3. Pipenv version: $ pipenv --version 8.2.6
Expected result

I’d expect the shell that was started to be the same as my current shell (i.e., powershell)

Actual result

The shell is always a CMD shell, as far as I can see there is no way to change this.

Steps to replicate

pipenv shell. It’s possible to work around this by using pipenv run powershell but this doesn’t set $env:VIRTUAL_ENV (which I believe is a known issue).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:30 (20 by maintainers)

github_iconTop GitHub Comments

andb0tcommented, May 21, 2020

Hey there, I have pipenv, version 2018.11.26 installed on powershell 5.1.17763.1007 and it still spawns the CMD instead of a powershell window. This puzzles me, since I thought it was fixed. Have I missed something?

uranusjrcommented, May 9, 2018

@hstefan Give this a shot! I don’t use the Msys2 Bash much, and does not have it set up in Cmder either (I deleted the default entry), Any work from me at this front would be mostly be done in the dark; I’d very much need someone to be able to test it more extensively. I plan to work on restructuring the _detect_shell function first, so please do work on it if you can. (I’m visiting my parents this weekend and might not be working on this much during the time.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

pipenv shell Launching subshell in virtual environment ...
So I run: pipenv shell and get only this message: Launching subshell in virtual environment… 'powershell.exe' is not recognized as an internal ...
Read more >
pipenv shell does not work in powershell ISE - Microsoft Q&A
I can run powershell ISE, and navigate to a folder where a pipenv is set up, e.g. if I run pipenv --venv I...
Read more >
2 years, 7 months ago -
PS C:\Users\versi\Dev\cfehome> pipenv shell Launching subshell in virtual environment… ... Consider switching to PowerShell instead of Command Prompt.
Read more >
Chapter 1: Initial Set Up | Django For Beginners
We start with an overview of the Command Line, a powerful text-only interface ... On Windows, the built-in terminal and shell are both...
Read more >
Installation - Streamlit Docs
Create a new Pipenv environment in that folder and activate that environment: pipenv shell. When you run the command above, a file called...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found