MyreMylar / pygame_gui

A GUI system for pygame.
MIT License
684 stars 78 forks source link

Pygame_GUI 0.6.12 is incompatable with Pygame 2.6.0 #625

Closed JosephHabisohn closed 1 month ago

JosephHabisohn commented 1 month ago

Describe the bug Importing pygame_gui 0.6.12 with pygame 2.6.0 completely breaks. An import error gets thrown: "cannot import name 'DIRECTION_LTR' from 'pygame'" on "import pygame_gui" (see screenshot)

To Reproduce Steps to reproduce the behavior:

  1. Install both pygame 2.6.0 and pygame_gui 0.6.12

Expected behavior The exception shown below to not occur.

Screenshots image

Platform and software (please complete the following information):

Additional context I am not using a venv and all packages are in the global scope. However, neither of these have posed any issue since I started developing with pygame and pygame_gui. I'm not sure if that is a huge problem or not, it honestly could be, I wouldn't know. Also, I upgraded from pygame 2.5.2 (everything did work normally in this version). In other words the last know working versions are:

joereynolds commented 1 month ago

Sorry to tack on but this is also happening with me

Pygame GUI version: 0.6.10 Python: 3.12 Pygame-ce: 2.5

MyreMylar commented 1 month ago

This happens when you have old pygame installed. You only want a recent version of pygame-ce in your environment. Only pygame-ce supports the latest features of SDL that enables stuff like Arabic language text. Just make sure to uninstall pygame and then reinstall pygame-ce and you should be fine.

On Fri, 9 Aug 2024, 07:46 Joe Reynolds, @.***> wrote:

Sorry to tack on but this is also happening with me

Pygame GUI version: 0.6.10 Python: 3.12 Pygame-ce: 2.5

— Reply to this email directly, view it on GitHub https://github.com/MyreMylar/pygame_gui/issues/625#issuecomment-2277765631, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGDGGTRNCXMNXV3TB4M6TDZQST2PAVCNFSM6AAAAABMG5JDKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZXG43DKNRTGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

aelydam commented 1 month ago

Sorry I can't help you, but I'm curious. Is there a reason you have both pygame and pygame-ce? If you have different projects, some with pygame and some with pygame-ce, you should be using virtual environments for each project.

JosephHabisohn commented 1 month ago

@aelydam The project started like 3 months ago with pygame, as I didn't know that pygame-ce existed. Then I wanted a gui package and installed pygame_gui, which installs pygame_ce automatically if i'm remembering correctly. I genuinely no idea having both was a problem because I have had no issues up until now.

Uninstalling pygame and reinstalling pygame-ce, has fixed this issue. I probably should have read the readme before starting. Lmao