greenfork / nimraylib_now

The Ultimate Raylib gaming library wrapper for Nim
MIT License
149 stars 16 forks source link

Pyray/Raylib problems on M1 OSx #83

Closed Rogeatic closed 2 years ago

Rogeatic commented 2 years ago

I've been trying for three days to get Raylib and pyray working on my new m1 MacBook, but every time I run the code it says "cannot import name '(whatever import runs first in the code)' from 'pyray'". slightly unrelated, I'm doing a coding class and I thought I needed Raylib to make some of this work, but when I install that it only gives the error "No module named 'raylib._raylib_cffi'" . I'm also using VS code, and to me this just seems like bad Metal support... I'm not sure where to look at this point, if anyone can help it would be greatly appreciated.

greenfork commented 2 years ago

Are you talking about this pyray? https://github.com/ryu577/pyray

Can you run a standalone NimraylibNow! example without anything else on your M1?

What version of Nim you are using? nim --version

Rogeatic commented 2 years ago

Thanks for helping. I am using Python, sorry should have specified. Python 3.8.9 (maybe there's a different arm version I need?) but I can't figure out the pyray import thing. when I install it, It says 'Successfully installed pyray-0.1.0' which I think is very old. When I used brew it gets version 4.2.0 or something like that, but it doesn't find the brew version in VS code.

Rogeatic commented 2 years ago

OK googling it a little bit I found that pyray only had a 0.1.0 update, and I think my problem is with raylib. When I install the raylib Dynamic version it seems to fix some stuff, but not the regular one. maybe I should ask over there then...

greenfork commented 2 years ago

This library, NimraylibNow!, is a Nim library. Nim and Python are two different languages, you can't use libraries from one language in another language without any prior work. If you want to use Raylib in Python, I would suggest going for one of the libraries mentioned in the Raylib's BINDINGS document. If you would like to use Raylib in Nim, the current library, NimraylibNow!, can be a good fit for you.

If don't know whether using Pyray and Raylib together is feasible or a good idea.

If you have any troubles installing the Pyray library, I think it is best you ask it in the Pyray repository since I have no knowledge of what troubles you could possibly have.

I hope this helps, thanks for your question!

Rogeatic commented 2 years ago

Thanks