electronstudio / raylib-python-cffi

Python CFFI bindings for Raylib
http://electronstudio.github.io/raylib-python-cffi
Eclipse Public License 2.0
142 stars 29 forks source link

building for ubuntu 20.04 with pip #32

Closed techmaticsnz closed 3 years ago

techmaticsnz commented 3 years ago

Hi,

*ubuntu 20.04 64 bit

this error popped up after running this command for the pip installer

Python 3.8.5 (default, May 27 2021, 13:30:53)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from raylib.static import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/nathan/.local/lib/python3.8/site-packages/raylib/static/__init__.py", line 1, in <module>
    from raylib.static._raylib_cffi import ffi, lib as rl
ModuleNotFoundError: No module named 'raylib.static._raylib_cffi

I can confirm that building from source works for ubuntu 20.04 though. Should i just send the wheel that gets generated for ubuntu 20.04

electronstudio commented 3 years ago

I think there is probably going to be a wide number of python versions and linux versions in use on RPIs so it's going to be necessary for most people to compile their own. But yes if you could post the wheel here it might be useful to some people, thanks!

techmaticsnz commented 3 years ago

This is for my desktop. I understand. Whats the best way to link the wheel?

electronstudio commented 3 years ago

There should be a space under the comment box that says "attach files". Click there, or drag the file on to there.

electronstudio commented 3 years ago

But you mean you're using Ubuntu 20.04 on a desktop PC now, not on RPI?

electronstudio commented 3 years ago

You shouldn't need to build at all on Ubuntu 20.04 on PC x64, we already have binaries for that on pypi. Just do:

   pip3 install raylib==3.7.0
techmaticsnz commented 3 years ago

But you mean you're using Ubuntu 20.04 on a desktop PC now, not on RPI?

short term fix... i can develop on my desktop while waiting for rpi to build. I'm doing the build for rpi too though. it's just good to get auto-complete when coding.

pip3 install raylib==3.7.0

I have it going on ubuntu now. so thanks for the tip later.

electronstudio commented 3 years ago

binary distribution on linux is a huge pain, the wheels i thought would work on any recent linux now seem not to work, so installing from source (or letting pip3 compile from source) is probably best.

electronstudio commented 3 years ago

i have updated the x64 linux binaries. tested on ubuntu 16.04 and Debian 11. To try it:

pip3 install raylib==3.7.0.post1