algorithmic modeling for Rhino
Using the following code in a gh python script :
from pygame import mixer # Load the required library
mixer.init()
mixer.music.load('D:/sound/countdown.mp3')
mixer.music.play()
i get the following error
Runtime error (ImportException): cannot import base from pygame
Traceback:
line 133, in <module>, "d:\programdata\anaconda3\lib\site-packages\pygame\__init__.py"
line 1, in script
Seems like the path is recognized but the program won't execute in gh.
On the other side, the program runs onto my python env (python 3.6 with spyder)
Thank you for your help
Tags:
Could be that pygame (or the version you are using) is not compatible with IronPython 2.7 (the one used by Rhino/Grasshopper). There are several threads on this subject. Mostly related to numpy/scipy (where the issue is its dependency on lower level C and Fortran functionality), but also networkx (where the issue is that newer versions target above Python 2.7).
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by