1
xylophone21 2015-04-16 19:01:38 +08:00
看看你的环境是不是装了多个python,然后运行的不是同一个。
|
2
napretep OP @xylophone21
你是说在系统属性-高级-环境变量里看吗? 用户变量为 %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Users\napretep\.babun;c:\python27 系统变量为 C:\Python27\;C:\Python27\Scripts;C:\Program Files\Intel\TXE Components\TCS\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\TXE Components\DAL\;C:\Program Files\Intel\TXE Components\IPT\;C:\Program Files\Leawo\Youtube Download; 我不知道自己装了几个,因为过去曾反复装过python3和2,现在按照记忆来看的话,应该是一个。 |
3
xylophone21 2015-04-16 19:36:05 +08:00
|
4
napretep OP @xylophone21
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import pyglet >>> pyglet.window.Window(800,600) Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> pyglet.window.Window(800,600) File "C:\Python27\lib\site-packages\pyglet\window\win32\__init__.py", line 131, in __init__ super(Win32Window, self).__init__(*args, **kwargs) File "C:\Python27\lib\site-packages\pyglet\window\__init__.py", line 505, in __init__ config = screen.get_best_config(template_config) File "C:\Python27\lib\site-packages\pyglet\canvas\base.py", line 161, in get_best_config configs = self.get_matching_configs(template) File "C:\Python27\lib\site-packages\pyglet\canvas\win32.py", line 33, in get_matching_configs configs = template.match(canvas) File "C:\Python27\lib\site-packages\pyglet\gl\win32.py", line 25, in match return self._get_arb_pixel_format_matching_configs(canvas) File "C:\Python27\lib\site-packages\pyglet\gl\win32.py", line 98, in _get_arb_pixel_format_matching_configs nformats, pformats, nformats) File "C:\Python27\lib\site-packages\pyglet\gl\lib_wgl.py", line 95, in __call__ result = self.func(*args, **kwargs) File "C:\Python27\lib\site-packages\pyglet\gl\lib.py", line 62, in MissingFunction raise MissingFunctionException(name, requires, suggestions) MissingFunctionException: wglChoosePixelFormatARB is not exported by the available OpenGL driver. ARB_pixel_format is required for this functionality. >>> |
5
xylophone21 2015-04-16 20:20:27 +08:00
在powershell里运行
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import pyglet >>> pyglet.window1.Window(800,600) 注意这个1,让它报类似的错误,你就可以看到powershell里用的是哪个路径下的pyglet了 |
6
laike9m 2015-04-16 20:38:03 +08:00
试试这个呢,用 wheel 来装
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyglet |
7
napretep OP @xylophone21
应该是同一个python吧。 cmd 和powershell输入 python -v 得到的目录都是在c:\python27里的 好在我用刚下了的pycharm没什么问题。 那这个问题就先放着还是最好解决掉啊? |