Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the extension can not find the path of python from microsoft store #10850

Closed
mbtk opened this issue Mar 29, 2020 · 19 comments
Closed

the extension can not find the path of python from microsoft store #10850

mbtk opened this issue Mar 29, 2020 · 19 comments
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug regression Bug didn't exist in a previous release

Comments

@mbtk
Copy link

mbtk commented Mar 29, 2020

Issue Type: Bug

I installed Python and everything works well. But after a VS update, every time I open VScode it says:"Python is not installed, please download and install...."

Extension version: 2020.3.69010
VS Code version: Code 1.43.2 (0ba0ca52957102ca3527cf479571617f0de6ed50, 2020-03-24T07:38:38.248Z)
OS version: Windows_NT x64 10.0.18362

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Mar 29, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Mar 31, 2020
@karthiknadig karthiknadig added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug and removed triage-needed Needs assignment to the proper sub-team labels Mar 31, 2020
@kimadeline
Copy link

Hello @mbtk,

Thank you for reaching out.

Can you send a screenshot of the error you're seeing? Can you also launch python in the terminal (Powershell or command prompt)?

Thanks!

@mbtk
Copy link
Author

mbtk commented Apr 3, 2020

image
And yes, I launch python in the terminal and in VScode also everything works well. It's just an error and I don't know why VS keeps showing this error.

@kimadeline
Copy link

Where did you install Python from: Windows store, downloaded executable, built it yourself, another way? Where is it installed?

Can you try downgrading the extension to a previous version (2020.2.64397) and check if this error still appears?

As a workaround, you can try checking the Disable Installation Check box in your settings to silence that warning:

image

@mbtk
Copy link
Author

mbtk commented Apr 4, 2020

I installed it from Windows store.
Anyway, I downgraded the extension to the version you mentioned and the error disappeared.
Thanks for your help.

@kimadeline
Copy link

Thank you for the feedback that downgrading works 👍 I won't close this issue, we will still need to investigate it further and fix it in the extension.

Telemetry: #10900

@kimadeline kimadeline added area-environments Features relating to handling interpreter environments needs PR regression Bug didn't exist in a previous release and removed info-needed Issue requires more information from poster triage labels Apr 6, 2020
@kimadeline kimadeline removed their assignment Apr 9, 2020
@karthiknadig karthiknadig changed the title python is not installed the extension can not find the path of python from microsoft store Apr 9, 2020
@karrtikr karrtikr added the P0 label Apr 13, 2020
@saschanaz
Copy link

saschanaz commented Apr 17, 2020

Downgrading to 2020.2.64397 doesn't work here, it still yells at me that I need to install Python. I have to manually set Python Path in vscode settings from python to C:\Users\Kagami\AppData\Local\Microsoft\WindowsApps\python.exe. PowerShell can access python so it shouldn't be PATH environment variable problem.

I'm on Windows 10 2004, BTW.

image

@JamesIllusion
Copy link

same as @saschanaz

@saschanaz
Copy link

saschanaz commented Apr 19, 2020

I suspect this is an OS-wide regression as other tools e.g. MSYS shell can't access any store-distributed commands anymore because of a permission issue.

@mbtk
Copy link
Author

mbtk commented Apr 20, 2020

same as @saschanaz

Please make sure that the extensions auto-update is disabled.

@saschanaz
Copy link

Please make sure that the extensions auto-update is disabled.

Auto-update is not fired and still:

image

@karthiknadig
Copy link
Member

When we switched to suing VS Code FS APIs looks like we started getting this issue. The files under %USERPROFILE%\AppData\Local\Microsoft\WindowsApps are apparently reparse points.

The underlying issue is we don't have a specific Windows Store App detection. Instead , we try to find the store app by searching it in directories listed in PATH env variable. Since, vscode.workspace.fs.readDirectory() does not get python.exe (reparse point) under %USERPROFILE%\AppData\Local\Microsoft\WindowsApps, we don't find it.

@kimadeline The reparse point might also be the reason for stat failing.

Filed microsoft/vscode#95828

@holymonson
Copy link

holymonson commented Apr 22, 2020

FYI, on macos it fails to find /usr/local/Caskroom/miniconda/base/bin/python from conda too, same as #10900.

Version: 1.44.2
Commit: ff915844119ce9485abfe8aa9076ec76b5300ddd
Date: 2020-04-16T17:07:18.473Z (5 days ago)
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 18.7.0

@somas95
Copy link

somas95 commented Apr 24, 2020

On Linux fails to find the regular python install (/usr/bin/python)

Version: 1.44.2
Commit: ff915844119ce9485abfe8aa9076ec76b5300ddd
Date: 2020-04-16T17:50:03.709Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.6.6-arch1-1

@karthiknadig
Copy link
Member

karthiknadig commented Apr 24, 2020

Part of the fix for this has to come from nodejs nodejs/node#33024 .
The temp workaround for this is in master. It will be available in the next release.

@holymonson @somas95 You might be running into a different issue. On mac and linux, usually the python that conda has is a symlink. I don't see a issue with node or VSC FS APIs with symlinks so far:
image
Can you try down grading extension version and see if it helps?

@stephtr
Copy link

stephtr commented Apr 24, 2020

For everyone stumbling across this issue: Even when using the next release version, there is an additional issue (#11412) with using Jupyter with the Microsoft Store version of Python. jupyter kernelspec list returns wrong (not sandboxed) paths (jupyter#544), which causes the vscode extension to not being able to start the kernel. A possible workaround is to create a new environment variable.

@somas95
Copy link

somas95 commented Apr 24, 2020

@karthiknadig It's not a conda install, rather a distro's repo one. I'll try downgrading the extension. Thanks!

@sebastus
Copy link

sebastus commented Apr 27, 2020

I installed Python using chocolatey (choco install python) and am seeing the same issue: "python is not installed. please download..."

Version: 1.44.2 (user setup)
Commit: ff915844119ce9485abfe8aa9076ec76b5300ddd
Date: 2020-04-16T16:36:23.138Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363

@karthiknadig
Copy link
Member

Fix for the windows store python is in build 2020.4.76186

@ghost ghost removed the needs PR label Apr 27, 2020
@karthiknadig
Copy link
Member

@sebastus give 2020.4.76186 build a try. If that does not work please file a separate issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug regression Bug didn't exist in a previous release
Projects
None yet
Development

No branches or pull requests

10 participants