Page 1 of 1

Relocatable environment

Posted: Fri Aug 09, 2019 8:51 am
by katiequinn
Hello all,
I would like to know how can I create relocatable virtual environment with micropython.
For example through virtualenv.

I tried to create virtual env:
virtualenv -p micropython <my_env>

but I received next error:
Running virtualenv with interpreter /usr/local/bin/micropython
MemoryError: memory allocation failed, allocating 10232 bytes

Re: Relocatable environment

Posted: Fri Aug 09, 2019 11:36 am
by jimmo
You can use the "-X heapsize=" option to increase the heap size, otherwise you can modify the "heap_size" variable at the top of ports/unix/main.c and build the micropython binary yourself.

I tried quickly to test this out but I ran into other issues first using "virtualenv -p micropython" (e.g. os.environ).