Closed sDos280 closed 2 years ago
It depends how you have setup your module search path, venv, if you are using an IDE, etc. By default, running from the command line, Python will check for the module examples/shapes/pyray. Assuming it doesn't find that, it will check site-packages/pyray and use that one.
I am editing and running my files via pycharm, is there a way to explicitly tell it to use site-packages/pyray?
There probably is, but I don't know. You could just delete raylib-python-cffi/pyray folder and then Pycharm will be unable to use that.
ok, I tested that and I just needed to remove the raylib-python-cffi/pyray and the raylib-python-cffi/raylib. thanks :).
I have another question, why did I get the error when I tried to run it with the raylib-python-cffi/pyray and the raylib-python-cffi/raylib? like why would I get that error? isn't that folder should be the same as the one on the site-packages/pyray?
It's because you haven't compiled the module. To do that you would do python raylib/build.py
. But you're on Windows, so compiling is difficult, so I didn't suggest it as solution.
ok, thanks for helping 🙃
I cloned that raylib-python-cffi repository into my pc but when I try to run the example I get that error. I think the problem is that when I use the "from pyray import *" line it tries to import the pyray package that is provided with the repository and not with the pyray package that is installed on the appdata\roaming\python\python310\site-packages folder. does anyone know how to fix that?