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

fix for msft python failing to detect pip packages due to pip needing… #8064

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bschnurr
Copy link
Member

@bschnurr bschnurr commented Nov 13, 2024

… to be updated.

in the StandardErrorLines it returns:

"[notice] A new release of pip is available: 23.0.1 -> 24.3.1"
"[notice] To update, run: C:\Users\bschnurr\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip"

now we check for no packages found and error strings. if so we just set packages to null and it falls back to directory search to display instead.

fixes #6774

… to be updated.

in the StandardErrorLines it returns:

"[notice] A new release of pip is available: 23.0.1 -> 24.3.1"
"[notice] To update, run: C:\\Users\\bschnurr\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\python.exe -m pip install --upgrade pip"

now we check for no packages found and error strings.
if so we just set packages to null and it falls back to directory search to display instead.
@bschnurr bschnurr requested a review from a team as a code owner November 13, 2024 01:09
Copy link

sonarcloud bot commented Nov 13, 2024

foreach (var line in proc.StandardErrorLines) {
Debug.WriteLine(line);
}
packages = null;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

below there is a case for null packages.
if (packages == null) {
// Pip failed, so return a directory listing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Python installed from Microsoft Store couldn't view installed packages when first use the environment.
1 participant