python / python/cpython

Store python interoperates poorly with common dev tools (vscode+mypy, git-bash, cygwin,)

Offen
#92,140 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

OS-windows type-bug
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
36k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

I had a brief chat on twitter with @zooba about this.

Bug report

The MS Store version of Python has something about it (sorry for vagueness - don't know the cause) that means existing software fails to invoke it with a "Permission Denied" error. Stackoverflow and other forums are full of these reports, with folk 'fixing' the problem by uninstalling the store version, or mucking with PATH etc to put the 'normal' installed version ahead on the PATH.

I recognize that this may be caused by something outside cpythons direct control, but there seems to be a cluster of programs with issues, and significant developer friction encountered, so if we can do anything to make the experience better (e.g. fund other projects to deal with the consequences of our choice, or ask MS to allow better interop between store and non-store programs or some such), that would be great.

Specific cases I've encountered:

  • git-bash within vscode, running 'python' or 'pip' etc in the terminal window results in that error. Similarly when invoked from with Makefiles and so on.

  • mypy extension for vscode installed; the mypy extension fails to find dmypy installed via the store python's pip.

  • poetry also fails with the MS store python version but a different error (they have a cluster of bugs - https://github.com/python-poetry/poetry/issues/2746 and similar with attempts to state non-existing files) - I think these are a different but perhaps related problem.

Your environment

Windows 11 up to date, Python 3.9 from the store.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das Verhalten Permission Denied unter Windows 11 mit dem Microsoft Store Python im git-bash-Terminal von VS Code zu reproduzieren, einschließlich der mypy-Erweiterung und der per pip installierten Tools. Das Issue nennt keine CPython-Dateien oder Tests; abgeschlossen wäre die Aufgabe erst, wenn eine konkrete, validierte Verbesserung der Interoperabilität identifiziert wurde oder dokumentiert ist, dass eine Abstimmung mit den betroffenen Tools oder Microsoft erforderlich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
bash, git, python, vscode
Bereich
developer-experience, tooling
Issue-Typ
Bug
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.