19cool53
Hi
I suffered problems installing OpenPLC by following the instructions on the website.
 
First, it stopped as it was not able to install a wheel for wxPython.
After some research, the wx version installed seemed to be wrong, thus I tried to
install by downloading and trying other wx versions.
For my Ubuntu install, the version wxPython-4.2.0-cp310-cp310-linux_x86_64.whl worked.
Trying to start the editor gave a "missing resource" result, witch I tried to solve by installing them one by one,
either an "apt instal python3-<resource>l" or a pip install <resource>.
 
apt  -y install python3-matplotlib
apt  -y install kde-zeroconf      ( perhaps not needed, see next line)
apt  -y install python3-zeroconf
apt  -y install python3-jinja2
 
Installing above caused installation of a bunch of other resources, I cannot list here,
but finally, I was able to start the editor.
 
Somehow the dependency check in python itself (by pip) or the desired resources check is providing the wrong wxPython version to be installed. This may strongly depend on whatever was done (installed) before the openPLC software. Perhaps installing on a fresh Ubuntu (Linux) might give a better and satisfying result?. 
Good luck
cool53
Reply 0 0
Write a reply...
thiagoralves
Did you try to install the website version or the latest source from GitHub? The website version has an older installer and that is causing problems on some Linux distros. You must install exactly the same Python and wx version that OpenPLC expects, otherwise you’ll face a lot of crashes and bugs. The code was written for Python 3.9 and wx 4.2.0. If you don’t have that exact configuration, try installing the GitHub version from https://github.com/thiagoralves/OpenPLC_Editor
Reply 0 0
19cool53
After installing as mentioned, the editor can be started but the LD language is missing. Might still be an installation mismatch.
I tried to install a virtual environment, did a "git clone"  and started the "install.sh" as non-root user,  where it asked for
the sudo passwd. All looked fine, quite a lot of python files were downloaded and installed, also wx version 4.2.0.
However, the Python Version remained at 3.10.12 and may be the reason for the last part complaining about 'u' should be 'D' , or warnings about "invalid suffix on literal; C++11" and more. But... I can start the editor and the now LD prog. language is selectable.

I am not so happy by the idea to downgrade the python version. Python is part of the ubuntu desktop and  I use a lot of python programms and helpers that may not work any more if I do.

I can send the "install screen messages" if you like.
As a suggestion you may create a docker install, that would be less version dependent.
Regards
cool
Reply 0 0
thiagoralves
You don’t have to downgrade Python. Multiple versions of Python can coexist in Linux. When you install Python 3.9 that’s just another version of Python that is installed. That’s why when you checked your Python version it was still showing 3.10.12, which most likely is the system’s Python version. But OpenPLC installer checks specifically for python 3.9 and creates a venv (virtual environment) with that just for OpenPLC Editor. If you don’t have Python 3.9 installed, it can’t create the 3.9 venv that the editor needs and the installation fails.
 
The C++11 warnings you saw are related to MatIEC and have nothing to do with Python. I find it very odd for the LD language to be missing. This looks more like a graphical glitch on the menu than it actually being missing. Can you share a screenshot of it?
Reply 0 0
19cool53
You don’t have to downgrade Python. Multiple versions of Python can coexist in Linux. When you install Python 3.9 that’s just another version of Python that is installed. That’s why when you checked your Python version it was still showing 3.10.12, which most likely is the system’s Python version. But OpenPLC installer checks specifically for python 3.9 and creates a venv (virtual environment) with that just for OpenPLC Editor. If you don’t have Python 3.9 installed, it can’t create the 3.9 venv that the editor needs and the installation fails.
 
The C++11 warnings you saw are related to MatIEC and have nothing to do with Python. I find it very odd for the LD language to be missing. This looks more like a graphical glitch on the menu than it actually being missing. Can you share a screenshot of it?
Your support is really great, thanks a lot.
But before I will mess up my productive Ubuntu completely, I will start a fresh Lubuntu 24.04 on a virtual machine and try the parallell install of a 3.9 python there.  I will report my results asap.
Regards, cool
Reply 0 0
19cool53
No, that didn't work either.
Everything went fine, it installed Python 3.9 until the create wxPython wheels started.
It stayed for more than 15 minutes, then continued with a long list of warnings - probably
errors. I logged them (partially) in a PLC_err.txt file (attached) with some installation
remarks, plus a screen install.log (also attached).
I also tried to modify the install.sh to give it a try with python3.11 as suggested.
But my result is rather frustrating, it probably will not work that way.
Reply 0 0
thiagoralves
All the warnings you saw on .cc files are related to MatIEC compilation and have nothing to do with Python. Those warnings are normal and expected.
 
On the wxPython installation, it does take a very long time to build, even up to one hour on some systems. Usually if you just leave it alone it will build just fine. Did you try to stop the building process? I couldn’t see any error messages about the building process, just that it failed for some reason. Can you check what caused wxPython to fail? Everything after that is just MatIEC and are not relevant to start the editor, just to compile plc programs (MatIEC is the “plc compiler”)
Reply 0 0
19cool53
Hi
You may be right on the errors that follow the wxPython creating wheels.
I watched (and logged) the screen output to a file as the screen changes to fast to follow the messages.
I did on both lubuntu_24.04 and lubuntu_22.04 (fresh virtual machines) an install by using the install.sh script.
Python3.9 was loaded and a .venv was activated, but in both cases wxPython ended with error. I did not touch it.

Whatever the reason may be, a fresh installed ubuntu (plus upgrade) should not make such problems, as it is straight out of the box.
Maybe a language problem? Or a newer/incompatible python include on the repository? 
Perhaps a software developer may reproduce the problem? Try a fresh ubuntu (minimal desktop) and an OpenPLC install? I can't find the wxPython error, as well as other logging info.
Regards
Cool
Reply 0 0
thiagoralves
I will try that on fresh Ubuntu VMs like you did and report back
Reply 0 0
19cool53
Any news sofar?


Reply 0 0
thiagoralves
I created a fresh x86_64 Lubuntu VM (iso downloaded from here: https://lubuntu.me/downloads/ 😉 and installed with updates. Then I cloned the OpenPLC Editor from the github repository and ran the install script. The installer took a long time to compile wxPython (don't know precisely how much as I was not attending to it) on a quad-core VM with 8GB of RAM. At the end installation completed successfully (with all the expected compilation warnings) and the editor opened just fine:
Screen Shot 2024-07-02 at 12.41.06 PM.png
Reply 0 0
thiagoralves
Edit: I misspelled the name of the VM. I actually installed Lubuntu 24.04, not 22.04:
Screen Shot 2024-07-02 at 12.51.01 PM.png
Reply 0 0
19cool53
I tried both versions without luck, but will repeat it once again.
I tried an install on a windows virt. machine, that went without errors. However, I do not have a windows license (my old and legal *open* win7 pro does not activate any more, and I hate MS for robbery).
I made a screen dump  (lubuntu 24.04) in a file, and saw the "wxpython create wheels" ending with "wxpython error", than followed by multiple errors as you mention them and will report my results.
 
I posess a FX3U-32MT clone, that I successfully patched with a boot0 and reset button. I will put my experience in the STM32 boards forum as well.
 
Thanks, with kind regards
cool
Reply 0 0
thiagoralves
Thanks for the information @19cool53 . I really want the software to be easy to install and to work for everyone. The Linux builds are by far the hardest, as each Linux distro has its own particularities. But as you saw, I cannot reproduce your issues even on the latest Lubuntu environment. I'm wondering if you have any proxy or blockers on your internet connection that could be preventing wxPython dependencies from being installed, or if you don't have enough RAM to build it. As I'm typing this I feel that the second option most likely is your problem. Try creating a swap file and enable it for swap memory. Swap memory is slow, but at least it won't crash for lack for memory.
Reply 0 0
19cool53
The ram or swap issue looks like a possible problem.
I use qemu/kvm on ubuntu instead of vmware, but that should not be the point. As the "wxPython wheel" takes a lot of time to make, it probably makes
heavy use of the swap file (Default VM is 20GB disk, 4 GB Memory).
My latest trial was - again - a fresh kubuntu 22.04 (not the lastest), and  a fresh OpenPLC_Editor clone.
I then opened the install.sh file as root, removed all sudo's and installed step by step to see if I missed any error.
Now, even the wxPython installed successfully (for the first time) and finally I was able to start the OpenPLC-Editor with success !!!
I will try a new install with a separate 10GB swap disk to see if that makes the differenc, and keep you informed.
Reply 0 0
Write a reply...
Reply