[英]Salabim not running on python 3.9
I am trying to run the package salabim but I get a very weird error.我正在尝试运行包 salabim,但出现了一个非常奇怪的错误。 I am currently using python 3.9 on a MacBook Pro running Big Sur 11.4
我目前在运行 Big Sur 11.4 的 MacBook Pro 上使用 python 3.9
This is the sample code I am using这是我正在使用的示例代码
import salabim as sim
class Car(sim.Component):
def process(self):
while True:
yield self.hold(1)
env = sim.Environment(trace=True)
Car()
env.run(till=5)
and this is the error这是错误
username@My-MacBook-Pro ~ % /usr/local/bin/python3 /Users/username/Desktop/Car.py
Traceback (most recent call last):
File "/Users/username/Desktop/Car.py", line 11, in <module>
env = sim.Environment()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/salabim/salabim.py", line 4662, in __init__
self.view = _AnimateIntro()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/salabim/salabim.py", line 4434, in __init__
self.setup(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/salabim/salabim.py", line 18276, in setup
self.model_lights_pname = gl.GL_LIGHT_MODEL_AMBIENT
AttributeError: 'NoneType' object has no attribute 'GL_LIGHT_MODEL_AMBIENT'
This was a bug in version 21.1.1, which is corrected now.这是 21.1.1 版中的一个错误,现已更正。 Please reinstall salabim.
请重新安装 salabim。 May I suggest subscribing to the salabim Google user group (see www.salabim.org )
我可以建议订阅 salabim Google 用户组吗(请参阅www.salabim.org )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.