[New-bugs-announce] [issue37369] Issue with pip in venv on Powershell in Windows

Brooke Storm report at bugs.python.org
Fri Jun 21 19:54:16 EDT 2019


New submission from Brooke Storm <brooke at largespiky.club>:

I am finding that, using Powershell on Windows 10 and the current version of Python 3.7.3 installed from the Microsoft Store, when I create a virtualenv via "python -m venv <name>" and activate it in Powershell with the Activate.ps1 script that is generated, pip fails with:

> pip freeze
Fatal error in launcher: Unable to create process using '"c:\users\<home>\<path-to-venv>\scripts\python.exe"  "C:\Users\<home>\<path-to-venv>\Scripts\pip.exe" freeze'

There are no spaces in my python path, and I cannot find any "simple workaround" that actually works online.  I am using pip 19.1.1 (current as of now).  This only happens with Powershell.  cmd.exe is able to use the virtualenv and pip just fine after using the activate.bat script.

If I activate in Powershell and run "python -m pip" or similar commands, including importing pip, I get a message that pip is not installed, which is interesting.

My Powershell version as installed is:
Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      18917  1000

I also tried Powershell Core 6 with the same result.  This seems to be a consistent behavior of the resultant Activate.ps1 script, which is why I'm creating the issue here.  I didn't find quite a duplicate when I searched, but I could be wrong.

----------
components: Windows
messages: 346264
nosy: bstorm, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Issue with pip in venv on Powershell in Windows
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37369>
_______________________________________


More information about the New-bugs-announce mailing list