Code: Select all
# First install venv module itself, globally
$ micropython -m upip install micropython-venv
Installing to: /home/pfalcon/.micropython/lib/
Warning: pypi.org SSL certificate is not validated
Installing micropython-venv 0.1 from https://files.pythonhosted.org/packages/eb/1a/021d98a10476352c798af4a106dae2cbe0f89f84a8bf2dac977bcc025a48/micropython-venv-0.1.tar.gz
# Create a virtual environment in the current dir
$ micropython -m venv .venv
# Activate it as usual
$ . .venv/bin/activate
# From now on, modules will be installed to / used from our virtual environment
$ micropython -m upip install micropython-pystone
Installing to: /home/pfalcon/tmp/.venv/lib/
Warning: pypi.org SSL certificate is not validated
Installing micropython-pystone 3.4.2-2 from https://files.pythonhosted.org/packages/13/00/8f7c7ab316e8850ea3273956e1370d008cfd36697dec2492388d3b000335/micropython-pystone-3.4.2-2.tar.gz
$ micropython -m pystone
Pystone(1.2) time for 50000 passes = 0.462
This machine benchmarks at 108225 pystones/second