Using venv for MicroPython #10255
|
Hi, |
Replies: 4 comments 8 replies
|
I think you can run |
|
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: |
|
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 |
|
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.
|
I think you can run
mipwith the--targetoption to install packages to a specific directory, then set theMICROPYPATHenvironment variable to that path before runningmicropython.