PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

"Python was not found; run without arguments to install from the Microsoft Store..." appeared in Python project.

Open ttSpace opened this issue 1 year ago • 13 comments

Describe the bug

image

Python from VS.

Steps to Reproduce

  1. Create a Python Application.

Additional context and screenshots

image

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 avatar Feb 18 '24 05:02 ttSpace

@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 avatar Feb 20 '24 20:02 StellaHuang95

@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.

image

projecterror

ttSpace avatar Feb 22 '24 07:02 ttSpace

Can you follow the steps here and see if that fixes your issue? Also, are you able to run python project at all? Thanks!

StellaHuang95 avatar Feb 22 '24 17:02 StellaHuang95

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.

image

ttSpace avatar Feb 23 '24 06:02 ttSpace

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.

StellaHuang95 avatar Mar 05 '24 18:03 StellaHuang95

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]

StellaHuang95 avatar Mar 05 '24 19:03 StellaHuang95

I can repro In today's build.

image

It cannot be reproduced after being added to the system environment.

image

ttSpace avatar Mar 06 '24 07:03 ttSpace

In today's build,python install from Microsoft Store.

image

There is an error after creating a virtual-environment.

image

linette-zyy avatar Mar 15 '24 07:03 linette-zyy

I can repro in today's build. Python installed from VS.

image

ttSpace avatar Apr 19 '24 05:04 ttSpace

In today's build, AssignProcessToJobObject: (87) The parameter is incorrect. appears after the virtual environment is created. Python installed from Microsoft Store.

image

ttSpace avatar Jun 24 '24 06:06 ttSpace

@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 avatar Jun 24 '24 13:06 StellaHuang95

@StellaHuang95 Yes, I was able to execute the code using the virtual environment.

image

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).

ttSpace avatar Jun 25 '24 02:06 ttSpace

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. image

linette-zyy avatar Jun 28 '24 09:06 linette-zyy