X Tutup
The Wayback Machine - https://web.archive.org/web/20220504113225/https://github.com/python/cpython/issues/92140
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

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

Open
rbtcollins opened this issue May 2, 2022 · 1 comment
Labels
OS-windows type-bug

Comments

@rbtcollins
Copy link

@rbtcollins rbtcollins commented May 2, 2022

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 - python-poetry/poetry#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.

@rbtcollins rbtcollins added the type-bug label May 2, 2022
@zooba
Copy link

@zooba zooba commented May 2, 2022

Last I looked, Cygwin tries to read the contents of an executable to check that it's a PE file before running it, but this doesn't work with the aliases used by Store apps. If they skip this check, then it'll launch properly.

I added a comment to the poetry issue - my guess is they're not using venv and are trying to copy the alias around instead of the launcher executable. But there's not enough useful info on that issue yet.

No idea about mypy. Maybe they're just hitting the issue that Store Python can't add its Scripts directory to PATH by default, and they never noticed this case because regular Python either doesn't put itself on PATH at all, or it puts both itself and Scripts?

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

No branches or pull requests

3 participants
X Tutup