首页 > 解决方案 > Pygame 初始化函数损坏

问题描述

我最近发现了一个错误

import pygame
pygame.init()

给我这个错误

pygame 2.0.1 (SDL 2.0.14, Python 3.9.2)
Hello from the pygame community. https://www.pygame.org/contribute.html
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  90
  Current serial number in output stream:  91

这个问题是新的和意想不到的,所以我认为它可能只是 pygame 不能与 python 3.9.2 一起工作。有谁知道解决方法?我尝试使用 3.8,但没有任何改变。如果重要的话,我正在使用 pop os。

谢谢你的帮助

标签: pythonpygame

解决方案


重新启动我的电脑解决了这个问题,但我仍然无法使用 pygame 2.0.0。


推荐阅读