Using venv for MicroPython #10255
-
|
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
|
I think you can run |
Beta Was this translation helpful? Give feedback.
-
|
We provide a micro version of the venv library in MicroPython lib that you can install on the unix port. You can install this via mip. We are considering making it included by default in the unix port. So: |
Beta Was this translation helpful? Give feedback.
-
|
Is there an issue with this? Do I need to do something other than setting PYTHONPATH to enable micropython to find the modules in ~/.micropython/lib |
Beta Was this translation helpful? Give feedback.
-
|
Documentation is lacking but with a little help from our helmed friend:
This sets up environment variables so invoking 'micropython' will use your venv's configuration.
|
Beta Was this translation helpful? Give feedback.
I think you can run
mipwith the--targetoption to install packages to a specific directory, then set theMICROPYPATHenvironment variable to that path before runningmicropython.