Page 1 of 1
Can not import urequests
Posted: Thu Nov 07, 2019 9:34 am
by shallwe
In the bin below, I can not import urequests, it shows "can not import, module not exists"
esp32spiram-idf3-20191107-v1.11-563-g4be316fb0.bin
esp32-idf3-20191107-v1.11-563-g4be316fb0.bin
esp32-idf4-20191107-v1.11-563-g4be316fb0.bin
But with the bin I download three month ago, named "esp32-20190831-v1.11-265-g12f13ee63.bin"
I can import urequests.
What happened?
Re: Can not import urequests
Posted: Thu Nov 07, 2019 11:34 am
by jimmo
I think these new builds must be being done with the default manifest, rather than the release one.
In the meantime
Code: Select all
import upip
upip.install('micropython-urequests')
I'll find out about getting the nightly builds fixed to use the release manifest.
Re: Can not import urequests
Posted: Fri Nov 08, 2019 5:50 am
by jimmo
This should be fixed from the next build (which is in about 12 hours time)
Re: Can not import urequests
Posted: Fri Nov 08, 2019 6:52 am
by shallwe
with the latest bin: esp32-idf3-20191108-v1.11-571-g7e374d231.bin
still not available
>>> upip.install('micropython-urequests')
Installing to: /lib/
Error installing 'micropython-urequests': list index out of range, packages may be partially installed
>>> upip.install('micropython-urequests')
Installing to: /lib/
Error installing 'micropython-urequests': list index out of range, packages may be partially installed
>>> import urequests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'urequests'
>>>
Re: Can not import urequests
Posted: Fri Nov 08, 2019 7:42 am
by jimmo
It hasn't been 12 hours yet. You'll need to wait for the next build (they happen automatically).
Re: Can not import urequests
Posted: Fri Nov 08, 2019 11:48 pm
by paulg
The following worked for me:
>>> <establish a network connection as a station>
>>> import upip
>>> upip.install('urequests')
upip will install urequests in /lib on your ESP32 board