Hi Rui and Sara,
Just bought your new MicroPython Course. Just what I was looking for,
so I immediately started reading and implementing the book, but didn’t get very far (yet) !
(Using Windows 10)
Python 3.7.1 installed as it should (I think).
Then I started getting the IDE ready (page 19/20) , but hit a bump in the road in getting uPyCraft to work.
I downloaded the uPyCraft file and tried to run it, but it did not and does not work…
First it complained that it could not find MSVCR100.dll. Fixed that by putting the dll in the same directory.
(as installing the visual studio runtime, the solution I found on the internet, did not fix the problem)
Now it still does not want to run. The log gives these “explanations”:
Traceback (most recent call last):
File “uPyCraft.py”, line 2, in <module>
File “C:\Python34\lib\site-packages\zipextimporter.py”, line 109, in load_module
ImportError: MemoryLoadLibrary failed loading PyQt4\QtGui.pyd: Cannot find module(in Dutch). (126)
I think more people will have or get this error and problem, so better to post this question in the forum…
The error-log seems to demand python 3.4, is that a problem ?
And do we need to install PyQT4 ?
Maybe we’ll have to recompile the source files for Python 3.7.1 ?
Hope there is a simple solution and hope you know how to fix this.
Thanks in advance and a BIG thanks to both of you for your inspiring work !
Thanks for your detailed explanation and I’ll definitely need to figure out a solution for this problem. I haven’t seen that problem before…
- Can you try to install Python 2.7 in your computer too? (you can have both version Python 3.7 and 2.7)
- Does the log only gives that error message?
Thanks for your kind words!
Thank you for your answer.
Installing Python 2.7 did not help.
And the log gives only that message, again and again …
Installed PyQt5 today and Eric IDE and some more things needed to run the source…
Then tried running and adapting the source to work with PyQt5,but could not find a way to do that, yet..
and could not find a way to install PyQt4, yet…
Maybe I’ll find some time tomorrow to try some other things.
Can you try to install PyQt4 with this link? https://riverbankcomputing.com/software/pyqt/download
That’s the official page for PyQT4: https://pypi.org/project/PyQt4/
I would assume that this should solve your problem. Thanks for your patience!
After a lot of tweaking and trying and installing different packages I finally got uPycraft working !
The binary/exe still does not run, it still gives the same errors.
But I prepared my (Windows 10) system using the instructions for installing the uPycraft source here:
(From where it says: This requires you to have python3.4, pyqt4, py2exe, qsci, pyserial and pyflakes installed)
I already had Python 3.7 installed from the instructions in your book.
And most of the packages installed by following the instructions, except for PyQt4.
PyQt4 does not have binary installation files for Windows anymore
and I (still) could not get the source from your links to install.
(I already tried that yesterday or the day before..)
BUT I found another way to install it… !
From this site I downloaded the ‘Wheels’ files for Python 3.7:
Then followed the instructions here: ( >>pip install <filename>.whl )
That took care of installing PyQt4.
(Don’t know if it’s important, but I uninstalled PyQT5 and PyQt5-sip)
THEN… opening uPycraft.py from the Python IDLE
and running the module (menu or F5)
OR running it from the command prompt :
FINALLY got it running !! Pffffff..
Wow, that was a lot of work, to get this program to run.
It seemed so simple in your book !
Now I can finally continue studying the MicroPython book and
follow the instructions to let my ESP boards work some magic.
Hope this solves the uPycraft problem for other’s, too !!
(BTW: In the final instructions for running the source (on Github) it reads:
Package File : uPyCraft.exe will be created in directory dist/ .
but I cannot find the exe file anywhere.
Do you know where to look or how to create that file ?
That might make uPycraft even easier to run,
and you could put that file on your site,
replacing the earlier version that did not work)
Hope I did not leave out one or more steps,
because I tried out quite a lot of things in my attempts to get it running,
before it suddenly, finally worked…
I will try to fill in the blanks, if it does not work for other people…
Another long and detailed explanation, but so very glad it finally works !
Looking forward to studying the rest of your book now…
Till next time, and Happy Holidays to you all !
Hello again, I apologize for the trouble getting uPyCraft to work. I think I only had one other reader having trouble installing it (it was missing Python in the Path).
I’ve personally installed uPyCraft IDE in 3 of my Windows PCs (I only have Python 3.7 in my Windows PCs and it always worked for me).
I’m not sure what was missing in your computer or which incompatibility caused that trouble. I’ll point anyone that asks me about this trouble to this thread. Thanks for detailing how you solved it!
I wish you a great holiday season.