Closed taiya closed 4 years ago
It's because python believes your python module /Users/atagliasacchi/moderngl.py
is in fact the moderngl library. You need to rename it to something else.
You can see this in the traceback
Traceback (most recent call last):
File "moderngl.py", line 2, in <module>
import moderngl_window
File "/Users/atagliasacchi/Envs/python3/lib/python3.7/site-packages/moderngl_window/__init__.py", line 13, in <module>
import moderngl
File "/Users/atagliasacchi/moderngl.py", line 6, in <module>
In the last line moderngl_window
is importing your module instead of moderngl. This is because python adds the directory of the script you run to be beginning of the python path. It's just one of those things to be careful about with python.
alright, I blame this to coding at 2am
if it's any consolation, I did the same last week 😄
TL;DR: this example generates
AttributeError: module 'moderngl_window' has no attribute 'WindowConfig'