# Mworks and python

**URL:** <https://mworks.discourse.group/t/mworks-and-python/118>\
**Category:** Support\
**Created:** [July 12, 2021, 8:59pm UTC](https://mworks.discourse.group/t/mworks-and-python/118 "2021-07-12T20:59:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 12, 2021, 8:59pm UTC](https://mworks.discourse.group/t/mworks-and-python/118/1 "2021-07-12T20:59:32Z")

</div>

Hi Chris,

As I’m setting up machines to use MOOG (modular object-oriented games; [Homepage API documentation](https://jazlab.github.io/moog.github.io/index.html)), I cannot load my mwel experiment, which works fine in the other machine. The error I’m getting is attached and I suspect that it’s because mworks in the latest version of Mac OS X (Big Sur 11.4) somehow cannot locate the path for python packages (e.g., matplotllib, sklearn). I’m puzzled by the fact that 1) The exactly same code and python environment work fine in the other Mac mini machine (2020 M1 while its OS X version is 11.1; even I used time machine to copy the state of working machine to the non-working machine), 2) It works fine if I just run a demo python script (i.e., I put the correct path for virtual environment). Do you have any thought on this? Let me know if you need more information.

Best,  
Hansem

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 12, 2021, 8:59pm UTC](https://mworks.discourse.group/t/mworks-and-python/118/2 "2021-07-12T20:59:32Z")

</div>

Attachments:

- [mworks\_server\_error.png](https://mworks.discourse.group/uploads/short-url/ld1PBMLFHpMfBrv6HZQ6RHKgviP.png) (176 KB)
- [mworks\_server\_error2.png](https://mworks.discourse.group/uploads/short-url/4FBEbheC07uLSDuVQd7s8Cau1iD.png) (321 KB)

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 13, 2021, 1:02pm UTC](https://mworks.discourse.group/t/mworks-and-python/118/3 "2021-07-13T13:02:38Z")

</div>

Hi Hansem,

Are you using a recent MWorks nightly build? If so, I think the issue is a Python version mismatch: As of about 2.5 weeks ago, MWorks’ bundled Python is now at version 3.9, which means it won’t load compiled extensions built for Python 3.8. If you install the required packages for Python 3.9 and update the search path appropriately, things should work again.

If that’s not the issue, let me know, and we’ll investigate further.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 13, 2021, 5:47pm UTC](https://mworks.discourse.group/t/mworks-and-python/118/4 "2021-07-13T17:47:03Z")

</div>

Upgrading to 3.9 works. Thanks, Chris!

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 19, 2022, 7:05pm UTC](https://mworks.discourse.group/t/mworks-and-python/118/5 "2022-07-19T19:05:24Z")

</div>


