Closed kongo09 closed 2 years ago
The command to invoke Python is python.exe
, not python3.exe
. The standard Python installer doesn't include a python3.exe, so I don't know how you have one. And virtualenv does not include a python3.exe
as part of the virtual environment (for the same reason).
This is interesting and I honestly don't have a clue why I have python3.exe
. I've used that all the time. But you're right, there is also a python.exe
. The both claim to be the same version of python:
PS C:\Windows\System32> python --version
Python 3.10.4
PS C:\Windows\System32> python3 --version
Python 3.10.4
but they're two different apps:
PS C:\Windows\System32> (get-command python.exe).Path
C:\Users\kongo09\AppData\Local\Microsoft\WindowsApps\python.exe
PS C:\Windows\System32> (get-command python3.exe).Path
C:\Users\kongo09\AppData\Local\Microsoft\WindowsApps\python3.exe
and the python.exe
version of the app does indeed work with the virtual environment, while the other does not:
(env) PS C:\Users\kongo09\OneDrive\Documents\docs\dev\test4> (get-command python3.exe).Path
C:\Users\kongo09\AppData\Local\Microsoft\WindowsApps\python3.exe
(env) PS C:\Users\kongo09\OneDrive\Documents\docs\dev\test4> (get-command python.exe).Path
C:\Users\kongo09\OneDrive\Documents\docs\dev\test4\env/Scripts\python.exe
So I'll close the ticket. The problem seems to be with me somehow, even though I have no clue what's going on.
Maybe the Windows Store version of Python includes python3.exe
? If so, maybe virtualenv should copy that from the base environment if it exists? I don't use the Store version myself, so I'm not sure...
Could be. There are python.exe
, python3.exe
, python3.10.exe
all with the same creation timestamp, all the same version of python. If the Windows Store creates all that by default, maybe the virtualenv should reflect that, so that novice users like myself don't stumble over it?
Issue
Local python interpreter of virtual environment not picked up after activation on Windows. Packages are not installed in the virtual environment but globally.
Environment
Provide at least:
pip list
of the host python wherevirtualenv
is installed:Output of the virtual environment creation
Make sure to run the creation with
-vvv --with-traceback
: