unix ImportError: no module named 'network'

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
anth
Posts: 4
Joined: Thu Apr 26, 2018 1:14 am

unix ImportError: no module named 'network'

Post by anth » Tue May 29, 2018 11:07 am

Does the network module exist for the unix port of micropython? I am getting this error:

Code: Select all

$ micropython 
MicroPython v1.9.4-101-g98d16093 on 2018-05-28; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import network
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'network'
>>> 
I am testing a program that needs to respond with the MAC address, and I think only the network module can provide that, or is there some other standard way to do that for the unix port?

Abdul R
Posts: 1
Joined: Wed Dec 23, 2020 9:22 am

Re: unix ImportError: no module named 'network'

Post by Abdul R » Wed Dec 23, 2020 9:27 am

In the Unix board like Raspberry Pi, you don't need the Network library at all. In Linux/Unix networking is being handled somewhere else. You can simply comment out the Network commands and use code without any issue.

Post Reply