I am trying to generate a random int and there is no urandom package on my wipy 3.0.
upip.install('urandom')
Installing to: /flash/
Error installing 'urandom': NotFoundError('Package not found',), packages may be partially installed
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/flash/lib/upip.py", line 230, in install
File "/flash/lib/upip.py", line 230, in install
File "/flash/lib/upip.py", line 218, in install
File "/flash/lib/upip.py", line 173, in install_pkg
File "/flash/lib/upip.py", line 159, in get_pkg_metadata
File "/flash/lib/upip.py", line 153, in url_open
File "/flash/lib/upip.py", line 153, in url_open
File "/flash/lib/upip.py", line 143, in url_open
NotFoundError: Package not found
I was able to install random.py, but it relies on urandom.
Micropython Version Details
Pycom MicroPython 1.20.0.rc4 [v1.9.4-1444e48] on 2019-01-07; WiPy with ESP32
Type "help()" for more information.
Installed the firmware via the pycom desktop app... I have a feeling this distribution from pycom strips a lot of the base packages from micropython.
Generate a random int = wipy 3.0
Re: Generate a random int = wipy 3.0
You are at the wrong forum. For WiPy3, ask as forum.pycom.io.
Besides that, in the Pycom variant of Micropython random numbers are provided by ucrypto.getrandbits() or uos.urandom().
See also the link to the documentation at their forum.
Besides that, in the Pycom variant of Micropython random numbers are provided by ucrypto.getrandbits() or uos.urandom().
See also the link to the documentation at their forum.