PTVS
PTVS copied to clipboard
"Python was not found; run without arguments to install from the Microsoft Store..." appeared in Python project.
Describe the bug
Python from VS.
Steps to Reproduce
- Create a Python Application.
Additional context and screenshots
Logs
Output for General
in the Output
panel
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
@ttSpace I can't repro this one. Do you have any python installed on your machine? Can you provide a gif of the repro steps?
@StellaHuang95 In today's build 17.10.0 Preview 2.0 [34621.182.main]
, Python Package: 17.0.24045.1
, I can repro it.
Python installed from VS.
Can you follow the steps here and see if that fixes your issue? Also, are you able to run python project at all? Thanks!
In today's build 17.10.0 Preview 2.0 [34622.236.main]
, Python Package: 17.0.24045.1
, I can repro it. (I followed the steps but it doesn't work. )
The Python project can be run.
Can you check if you have added the path where your Python interpreter is installed into your environmental variable? Put this path into System variable, not in user variable.
I am still not able to repro this one with a clean install in my devbox. I was on Microsoft Visual Studio Enterprise 2022 (64-bit) - Int Preview Version 17.10.0 Preview 3.0 [34704.287.main]
I can repro In today's build.
It cannot be reproduced after being added to the system environment.
In today's build,python install from Microsoft Store.
There is an error after creating a virtual-environment.
I can repro in today's build. Python installed from VS.
In today's build, AssignProcessToJobObject: (87) The parameter is incorrect.
appears after the virtual environment is created.
Python installed from Microsoft Store.
@ttSpace Was it just an output? Were you able to execute the code using the virtual environment you created? Also, what does the pylance output say?
@StellaHuang95 Yes, I was able to execute the code using the virtual environment.
Logs
Output for Pylance
in the Output
panel
Info: (10348) Pylance language server 2024.6.101 (pyright version 1.1.368, commit b7be7b9a) starting
Info: (10348) Server root directory: file:///c%3A/program%20files/microsoft%20visual%20studio/2022/preview/common7/ide/extensions/microsoft/python/core/pylance/dist
Info: (10348) Starting service instance "PythonApplication14"
Info: Un-registering request handler for 9c368d62-a52b-45b2-95ca-b8187a167dda failed.
Info: (10348) Setting pythonPath for service "PythonApplication14": "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\python3.9.exe"
Info: (10348) No include entries specified; assuming c:\Users\vting\source\repos\PythonApplication14\PythonApplication14
Info: (10348) Auto-excluding **/node_modules
Info: (10348) Auto-excluding **/__pycache__
Info: (10348) Auto-excluding **/.*
Info: (10348) Assuming Python version 3.9.13.final.0
Info: (10348) Found 1 source file
Info: (10348) Background analysis(1) root directory: file:///c%3A/program%20files/microsoft%20visual%20studio/2022/preview/common7/ide/extensions/microsoft/python/core/pylance/dist
Info: (10348) Background analysis(1) started
Info: (10348) Auto-excluding c:\Users\vting\source\repos\PythonApplication14\PythonApplication14\env
Info: (10348) Found 1 source file
Info: (10348) Auto-excluding c:\Users\vting\source\repos\PythonApplication14\PythonApplication14\env
Info: (10348) Found 1 source file
Info: (10348) Auto-excluding c:\Users\vting\source\repos\PythonApplication14\PythonApplication14\env
Info: (10348) Found 1 source file
Info: (16156) Pylance language server 2024.6.101 (pyright version 1.1.368, commit b7be7b9a) starting
Info: (16156) Server root directory: file:///c%3A/program%20files/microsoft%20visual%20studio/2022/preview/common7/ide/extensions/microsoft/python/core/pylance/dist
Info: (16156) Starting service instance "<default>"
Info: (16156) No include entries specified; assuming \<default workspace root>
Info: (16156) Auto-excluding **/node_modules
Info: (16156) Auto-excluding **/__pycache__
Info: (16156) Auto-excluding **/.*
Error: (16156) File or directory "\<default workspace root>" does not exist.
Info: (16156) No source files found.
Info: (16156) Background analysis(1) root directory: file:///c%3A/program%20files/microsoft%20visual%20studio/2022/preview/common7/ide/extensions/microsoft/python/core/pylance/dist
Info: (16156) Background analysis(1) started
Info: (16156) Indexer background runner(2) root directory: file:///c%3A/program%20files/microsoft%20visual%20studio/2022/preview/common7/ide/extensions/microsoft/python/core/pylance/dist (index)
Info: (16156) Indexing(2) started
Info: (16156) scanned(2) 18 files over 1 exec env
Info: (16156) indexed(2) 9 files over 1 exec env
Info: (16156) Indexing finished(2).
In today's latest build:17.4.21 [35026.314.d17.4],Python Package:17.0.22263.6
An error was reported in the output window when creating the env.