Tiny Core Base > Raspberry Pi

Python 3.6 is unable to find Python's smbus module

<< < (3/3)

gatorback:
UPDATE:
I am excited at the prospect of creating a .tcz file: here is the log!  After the smbus.tcz file was created: I have configure /tce/onboot.lst to load smbus.tcz at boot time.   The newly complied extension is saved to /tce/optional/: changes were backed-up with: filetool.sh -b

ROADBLOCK:
The new smbus.tcz loaded, however smbus did not import into python3.6 or 2.7:


--- Code: ---tc@box:~$ cd /mnt/mmcblk0p2/tce/optional/
tc@box:/mnt/mmcblk0p2/tce/optional$ md5sum -c py-smbus3.tcz.md5.txt
py-smbus3.tcz: OK
tc@box:/mnt/mmcblk0p2/tce/optional$ md5sum py-smbus3.tcz
1427ef7aa496489aea6e596bc343f053  py-smbus3.tcz
tc@box:/mnt/mmcblk0p2/tce/optional$ md5sum py-smbus.tcz
1427ef7aa496489aea6e596bc343f053  py-smbus.tcz
tc@box:/mnt/mmcblk0p2/tce/optional$ tce-load -i py-smbus.tcz
py-smbus.tcz: OK
tc@box:/mnt/mmcblk0p2/tce/optional$ tce-load -i py-smbus.tcz
py-smbus is already installed!
tc@box:/mnt/mmcblk0p2/tce/optional$ sudo python3.6
Python 3.6.0 (default, Dec 23 2016, 19:26:34)
[GCC 6.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import smbus
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'smbus'
>>>

--- End code ---

Did I miss a step somewhere?  What tests can be done to determine why module is not found?

Juanito:
It should look like this, no:
--- Code: ---$ tce-load -i py3.6-smbus2.tcz
py3.6-smbus2.tcz: OK
$ python3.6
Python 3.6.9 (default, Dec 11 2019, 17:44:28)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import smbus2
>>>

--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version