asweigart / asweigart/pipfromrepl
Windows 10 MS Store Python 3.9 has no pip
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 12
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Wow - what a useful script! Really well done Al. Amazing that it's only 70 lines. I don't intend for this bug report to be critical. It's just a heads up that students discovering Python via the MS store may not find things as easy as intended (like me they may have left it as the first Python in their PATH, so the system's default from cmd. You and I can fix that no problem of course, but the whole point of pipfromrepl is that beginners shouldn't have to).
C:\Users\James>python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess, sys; subprocess.run([sys.executable, '-m', 'pip', 'install', 'pipfromrepl'])
C:\Python39\python.exe: No module named pip
CompletedProcess(args=['C:\\Python39\\python.exe', '-m', 'pip', 'install', 'pipfromrepl'], returncode=1)
>>>
If that's not the MS App store Python 3.9, then apologies - I must have just installed an unusual build from somewhere. It does have a compiled pip at C:\Python39\Scripts\pip.exe, but obviously .exes are not runnable as a python modules.
But have some confidence - I could (via import subprocess, sys; subprocess.run([sys.executable, '-m', 'pip', 'install', 'pipfromrepl']) ) successfully install pipfromrepl in the REPLs from official python.org windows builds for Python 3.10.6 and 3.8.10, as well from the Python 3.9.13 VS Code installed for itself to debug with (if anyone would track that down to run as a REPL).
The Python 3.9 bundled with QGIS didn't have the ssl module available, so it couldn't download pipfromrepl or anything else from pypi. And if anyone else also still uses it, I couldn't install pipfromrepl in Python 2.7 via the REPL.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with the Microsoft Store Python 3.9 build and compare it with the working Python installations listed in the issue. Start by checking how pipfromrepl invokes pip through the Python REPL; done would mean the intended installation path either works or clearly reports that the environment is unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100