mcfletch / pyopengl

Repository for the PyOpenGL Project
Other
314 stars 97 forks source link

Python 3.9 cannot install pyopengl-accelerate. Log attached. #97

Closed pallebone closed 1 year ago

pallebone commented 1 year ago

Hi there,

On Debian in a virtual environemtn I cannot install pyopengl-accelerate via: pip install pyopengl-accelerate --log /home/aragorn/log.txt

"python setup.py bdist_wheel did not run successfully."

The log is attached here:

Is this a known issue?

Kind regards Peter log.txt

gentlegiantJGC commented 1 year ago

There were issues with pyopengl accelerate with Mac as well. Perhaps I should just disable it. It is an optional dependency that makes part of pyopengl faster but I don't know if we use those parts.

pallebone commented 1 year ago

There were issues with pyopengl accelerate with Mac as well. Perhaps I should just disable it. It is an optional dependency that makes part of pyopengl faster but I don't know if we use those parts.

If we cant get anywhere maybe but I will try fix this underlying issue first as it might help a lot of people.

mcfletch commented 1 year ago

The error appears to be some weird setuptools/distutils change. On a current ubuntu 22.04 in a virtualenv the install works as expected:

mcfletch@caramon:~/tmp$ virtualenv -p python3.9 39-test
created virtual environment CPython3.9.16.final.0-64 in 118ms
  creator CPython3Posix(dest=/home/mcfletch/tmp/39-test, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/mcfletch/.local/share/virtualenv)
    added seed packages: pip==23.0.1, setuptools==67.3.2, wheel==0.38.4
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
mcfletch@caramon:~/tmp$ source 39-test/bin/activate
(39-test) mcfletch@caramon:~/tmp$ cd 39-test/
(39-test) mcfletch@caramon:~/tmp/39-test$ pip install pyopengl-accelerate
Collecting pyopengl-accelerate
  Downloading PyOpenGL-accelerate-3.1.6.tar.gz (550 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 550.6/550.6 kB 15.3 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyopengl-accelerate
  Building wheel for pyopengl-accelerate (setup.py) ... done
  Created wheel for pyopengl-accelerate: filename=PyOpenGL_accelerate-3.1.6-cp39-cp39-linux_x86_64.whl size=1723580 sha256=e933318d9bfbe16ca30b4742c4798d4560c5b1df4d363cf7e039971cfdfec740
  Stored in directory: /home/mcfletch/.cache/pip/wheels/60/39/44/6baa68d264bdf2622d0cfa27342721d71601ba15977a6173fd
Successfully built pyopengl-accelerate
Installing collected packages: pyopengl-accelerate
Successfully installed pyopengl-accelerate-3.1.6

[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
(39-test) mcfletch@caramon:~/tmp/39-test$

similar tests with venv (vs virtualenv) setting up the virtualenvs and pip on releases 22 and 23 all seem to succeed.

I'm not sure what the AttributeError: install_layout being reported is, but it looks like a mismatch between setuptools and the distutils underneath it. There are reports of similar errors https://stackoverflow.com/questions/36296134/attributeerror-install-layout-when-attempting-to-install-a-package-in-a-virtual which all seem to be addressed with a setuptools upgrade or force-reinstall.

mcfletch commented 1 year ago

I've attempted to get PyOpenGL-accelerate building using cibuildwheel for the 3.1.7 release. I'm hoping that will make it easier to install on the common platforms.

pallebone commented 1 year ago

Hello @mcfletch,

Thank you for responding to my issue. It is appreciated.

I dont understand what you would like me to do. Can you provide more clarification? Are you asking me to use an older version of setuptools and retry or are you asking me to wait for a new version of pyopengl-accelerate and test that?

Im happy to try either direction, please clarify what you want me to do and test.

Kind regards Peter

pallebone commented 1 year ago

I saw there was an update to your package and was able to build against 3.1.7 successfully. Please allow me some days to do further testing and I will report back

pallebone commented 1 year ago

Thank you I can now build your package with setuptools 67.8.0 PyOpenGL-accelerate 3.1.7

Kind regards Peter