interpreters/python: Enable using pip to install Python packages#3487
Merged
Conversation
This commit enables using `pip` as a pre-compiled (pyc) built-in distributed along with cpython. Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
89af64b to
3cebed7
Compare
6 tasks
jerpelea
approved these changes
May 18, 2026
fdcavalcanti
approved these changes
May 18, 2026
acassis
approved these changes
May 18, 2026
Contributor
|
@tmedicci can we "pip install fastapi" and start using NuttX as web server for Cloud Application? :-D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Say hello to Python's
pipon NuttX!pipto install Python packagespipis provided as a pre-compiled (pyc) built-in distributed along with cpython.Please note that this is an initial development. There are many things to develop, but this is the starting point. Help is needed (and appreciated, for sure)!
Impact
Impact on user: Yes. Provide them
pipto install Python packages.Impact on build: No.
Impact on hardware: No.
Impact on documentation: No.
Impact on security: No.
Impact on compatibility: No.
Testing
rv-virt:pythoncan be used to test it:Building
Running
Please note that this Python distribution does not support the
_sslmodule yet, sopipcan't download packages directly, but it still can be used to install packages locally. That being said, some preparation is required to download a python package on the host machine and, then, transferring it to QEMU.Preparing the Host to serve the Python package
On the host machine, download the Python package and enable a local HTTP server:
Running RISC-V QEMU
Then, use
wget -o /tmp/six-1.17.0-py2.py3-none-any.whl http://<host_ip>:8080/six-1.17.0-py2.py3-none-any.whlto download the package to the running QEMU. And, finally, install it withpip:Installing the package may take a while (there is still room to optimize it. Help needed!)
Results
Check the package's version on Python: