frankie
I have tried to install OpenPLC editor on MacOS, but ran into problems. The terminal output showed error messages and failure to install wx. When the installation finished, not surprisingly OpenPLC Editor would not run, with the message failed to import wx. This seems simple enough, so I tried to manually install wxPython 3.0 using brew (because that is the package manager that the main installer was using). No success, it seems like 3.0 does not exist any more. I tried pip as well. I have version 4.2.0 installed, but that doesn't seem to help. Is there a workaround that can get me started?

Very frustrated, I decided to try a linux install on a new installation of Debian especially built for the occasion (on an older laptop that's not getting used much). Almost the same problems occurred, that's even more frustrating. I attach the terminal output, in the hope that someone can spot what I am doing wrong here. 

Thanks in anticipation!
Reply 0 0
thiagoralves
On macOS you must use the dev-python3 branch as it is based on python3 and wxPython4. That is what the macOS installer tries to install. Did you use the official macOS installer from the website?

On Linux, try Ubuntu. I just recently repackaged the wxPython package for Ubuntu, and it seems that Debian doesn’t like the package format. I’ll check it out on a new Debian distro and see if it is fixable
Reply 0 0
thiagoralves
Fixed the issue with Debian (Ubuntu continues working fine):  https://github.com/thiagoralves/OpenPLC_Editor/commit/45bcd3dabedba46084a86f7c4af58c6581b887e8

The wxPython .deb files were generated on Ubuntu and for some reason Debian complains about the compression used. Generating them on Debian seems to work on both Debian and Ubuntu. Tested on a clean x64 Debian 11 VM:
Screen Shot 2022-10-26 at 12.28.46 PM.png
Reply 0 0
frankie
Thanks Thiago, you are a champion. I am up and running now on Debian, and you have earned yourself a new subscriber.

I would still like to get things working on the Mac, as that is a better computer and I have been using it with Arduino for some time. Of course my original install attempt was just done by clicking the download button and following the video instructions. I don't WANT to make things hard! However, still no success. Brew is giving me dire warnings about my MacOS 10.15.7 being too old for support, but Apple won't allow further OS upgrades on this hardware. This may well be the problem, but it seems a pity if I can't continue using a perfectly good machine.  

Here is the terminal output. I think the problem is at line 3121 "ERROR: Failed building wheel for wxPython". The installer spent ages spinning that wheel then seemed to give up. Do you think anything can be done?
Reply 0 0
thiagoralves
frankie wrote:
Thanks Thiago, you are a champion. I am up and running now on Debian, and you have earned yourself a new subscriber.

Thank you @frankie !!

I checked your logs and indeed the problem is your macOS version. It really sucks when Apple drops support for a perfectly working machine. But the problem is that, for your macOS version, there aren’t any prebuilt binaries of wxPython on pip, so it tries to build that from source, which is never a good idea. That’s why it took ages, because it was building the whole wxPython, and eventually it crashed somewhere in a little detail that is really hard to debug because it belongs to wxPython code. What I can suggest you to do is to check if there are any prebuilt versions of wxPython for your macOS version. OpenPLC installer forces 4.1.1 because it is known to work best with that version. But you can edit the installer script to just say wxPython instead of wxPython==4.1.1. This will make pip get the best version for your OS as opposed to force install 4.1.1 even if there aren’t any binaries for it
Reply 0 0
thiagoralves
Another approach as well would be to spin up a Debian VM on your Mac using Virtualbox. Then you can install OpenPLC Editor on the Debian VM. I know it is not ideal, but at least you will be running OpenPLC with all its glory on the same machine 😉

The macOS version of OpenPLC Editor is still in beta (because it is based of Python 3 and wxPython 4). There are a couple things that aren’t working perfectly yet, and simulation is one of them. That’s why I think it is a better idea to just use a Debian VM
Reply 0 0
frankie
Hi Thiago,

Thanks again for your help. I understand that Virtualbox is a good option for you, I'm sure you have had to do development and testing on multiple platforms to get such a project up and working. For me, it's a steep learning curve. I have finally got the editor up and running on a virtual box. Can you tell me how to get a usable size of window? I know it's not core topic here, but am hoping to share a bit of your experience! I have searched quite a bit, but none of the threads  I found give me a clear path, and mostly seem to be based on old versions of the software (well the menu options suggested don't match what I've got). I have allocated the maximum video memory of 128MB, but it is no way usable for OpenPLC Editor with its multiple panes. Scaling doesn't affect the resolution. I'd share a screenshot, but I still haven't got file sharing or clipboard sharing working on Virtualbox.
Reply 0 0
thiagoralves
You need to install the VM drivers to be able to change screen resolution. Usually Linux distributions come with those things built in, but Debian is pretty raw. You can try to install Virtualbox guest additions yourself, or just try another distro, like Ubuntu or Fedora for example. I’m pretty sure those come with VM video drivers by default.
Reply 1 0
thiagoralves
Good news @frankie . I finally found the issue on the macOS installer and was able to fix this. Please remove your old OpenPLC Editor for macOS app and download the new one from the OpenPLC website. The new app comes with the installer fixes and should be able to download and install all dependencies quickly. Please let me know if you run into problems.
Reply 0 0
Reply