compatibility of new mWorks with moog_games

Setayesh Radkani's Avatar

Setayesh Radkani

27 Jul, 2021 08:44 PM

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

  1. Support Staff 1 Posted by Christopher Sta... on 27 Jul, 2021 09:18 PM

    Christopher Stawarz's Avatar

    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

  2. 2 Posted by Setayesh Radkan... on 27 Jul, 2021 09:42 PM

    Setayesh Radkani's Avatar

    Thanks Chris for your quick response.

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

    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?

  3. 3 Posted by Setayesh Radkan... on 27 Jul, 2021 10:33 PM

    Setayesh Radkani's Avatar

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

  4. Support Staff 4 Posted by Christopher Sta... on 28 Jul, 2021 02:12 PM

    Christopher Stawarz's Avatar

    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

  5. 5 Posted by Setayesh Radkan... on 28 Jul, 2021 05:09 PM

    Setayesh Radkani's Avatar

    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

  6. Christopher Stawarz closed this discussion on 07 Sep, 2021 03:57 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac