seigot / tetris

A Tetris Game for programming education in Japanese
MIT License
30 stars 107 forks source link

GitAuto: python start.py実行時にエラー(ModuleNotFoundError: No module named 'PyQt5') #157

Open gitauto-ai[bot] opened 3 weeks ago

gitauto-ai[bot] commented 3 weeks ago

Resolves #36

Why the bug occurs

The application raises a ModuleNotFoundError for 'PyQt5' when executing start.py because the PyQt5 library is not included in the project's requirements.txt. As a result, it is not automatically installed during the dependency installation process.

How to reproduce

  1. Clone the repository.
  2. Navigate to the project directory.
  3. Install dependencies using pip install -r requirements.txt.
  4. Run the application with python start.py.
  5. Encounter the error:
    ModuleNotFoundError: No module named 'PyQt5'

How to fix

Add PyQt5 to the requirements.txt file to ensure it is installed automatically when setting up the project. This change will allow users to install all necessary dependencies seamlessly, preventing the ModuleNotFoundError.

Steps:

  1. Open the requirements.txt file.
  2. Add the following line:
    PyQt5>=5.15.7
  3. Commit and push the changes.

This modification ensures that PyQt5 is included in the dependency installation process, resolving the import error when running start.py.

Test these changes locally

git checkout -b gitauto/issue-36-1db8dc8a-c0d6-4f41-af08-be8ea5bb6423
git pull origin gitauto/issue-36-1db8dc8a-c0d6-4f41-af08-be8ea5bb6423