Compatibility of new mWorks with moog_games

Hi Chris,

Today I installed the newest version of mWorks. However, it seems that it’s not compatible with moog_games anymore. I tried both python 3.8 (which has been working well before I update mWorks) and 3.9, and neither of these work. I get an error when trying to load the PIL renderer in moog. I attached screenshot of the error in both 3.8 and 3.9 versions.

Thanks,
Setayesh

Attachments:

Hi Setayesh,

Yes, the MWorks nightly build now bundles Python 3.9, so you’ll need to use 3.9-compatible versions of all required Python packages. (Hansem hit the same issue recently.)

The failure with Python 3.9 is likely due to another recent change in the nightly build, which is that MWorks now natively supports both Intel and Apple Silicon processors. I’m guessing that you’re running on an Apple Silicon (M1) Mac, but the version of PIL you’ve installed includes only Intel binaries. While it doesn’t appear that Anaconda provides Apple Silicon-native binaries yet, there are native binaries for Pillow on PyPI, so you could try installing those.

Alternatively, you can force MWServer to run as an Intel process via Rosetta 2 (details). However, this does degrade performance somewhat, so using native binaries is preferable if possible.

Cheers,
Chris

Thanks Chris for your quick response.

Yes, I have Apple M1 with Big Sur. I tried the solution here to install pillow: Unable to install Pillow on the Macbook Pro 13 M1 Silicon · Issue #5093 · python-pillow/Pillow · GitHub

However, it still gives me this error:
dlopen(/Users/psychophysics/opt/anaconda3/envs/moog_task39/lib/python3.9/site-packages/PIL/_imaging.cpython-39-darwin.so, 2): no suitable image found. Did find:
/Users/psychophysics/opt/anaconda3/envs/moog_task39/lib/python3.9/site-packages/PIL/_imaging.cpython-39-darwin.so: mach-o, but wrong architecture
/Users/psychophysics/opt/anaconda3/envs/moog_task39/lib/python3.9/site-packages/PIL/_imaging.cpython-39-darwin.so: mach-o, but wrong architecture

I was running the previous version of the mWorks on the same computer and it was working. Is there a way I can go back to that version of the Nightly build again?

I could run it with Rosetta. How would this impair performance?

Hi Setayesh,

Yes, I have Apple M1 with Big Sur. I tried the solution here to install pillow: https://github.com/python-pillow/Pillow/issues/5093

There’s a lot going on in that thread. What exactly did you try?

In any case, there’s an Apple Silicon, Python 3.9 wheel of Pillow on PyPI (direct link) that you should be able to install. I think this command would work:

/Users/psychophysics/opt/anaconda3/envs/moog_task39/bin/pip3 install Pillow-8.3.1-cp39-cp39-macosx_11_0_arm64.whl

I’m not certain that’s the correct path to pip3, though. Also, it’s possible that pip will reject the wheel because it doesn’t have the expected architecture.

I could run it with Rosetta. How would this impair performance?

Apps running under Rosetta are translated from Intel to native instructions, so they run slower. That said, performance under Rosetta, while not equivalent to native code, seems to be very good. Also, any older version of MWorks you used on your M1 Mac was already running under Rosetta. If you were happy with its performance, then you should have no issue with continuing to use Rosetta.

Cheers,
Chris

Hi Chris,

I installed the Pillow-8.3.1-cp39-cp39-macosx_10_10_x86_64.whl file (by changing the name to macosx_10_16 which is the version I’m using). But I will try the one you sent as well (Pillow-8.3.1-cp39-cp39-macosx_11_0_arm64.whl).

Oh great! The performance of the older mWorks was quite good indeed. Thank you for your help.

Best,
Setayesh