[Windows / Linux] Error: 'module' object has no attribute 'Pin'
Posted: Sat Apr 25, 2020 4:37 pm
I want to develop Micro-Python for my microcontroller and figured it could be useful to be able to run it locally (i.e. on my PC) too.
So I built Micro-Python for Windows (https://github.com/micropython/micropyt ... ts/windows) using Microsoft Visual Studio 2019, which was successful. I can run `.\micropython` and use the Micro-Python interpreter. I can also `import machine` without any problems.
But when I try to use any machine module, e.g. `pin = machine.Pin(0, PIN.IN)` I get errors like this:
I tried building and using it on my Ubuntu laptop too, with exactly the same result.
Is something broken on my installs? Or are the Windows/Linux Micro-Python builds not supposed to be able to do much?
So I built Micro-Python for Windows (https://github.com/micropython/micropyt ... ts/windows) using Microsoft Visual Studio 2019, which was successful. I can run `.\micropython` and use the Micro-Python interpreter. I can also `import machine` without any problems.
But when I try to use any machine module, e.g. `pin = machine.Pin(0, PIN.IN)` I get errors like this:
It seems like the machine module is entirely empty.'module' object has no attribute 'Pin'
I tried building and using it on my Ubuntu laptop too, with exactly the same result.
Is something broken on my installs? Or are the Windows/Linux Micro-Python builds not supposed to be able to do much?