[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
回复 7# yu2n


不是, 有办法的

TOP

本帖最后由 aa77dd@163.com 于 2016-9-25 23:05 编辑

回复 6# 523066680




以下过程于 中文 64位 Win 7 成功:

在 python-3.5.2 环境安装 非官方的 PyOpenGL 包,

由于此学校网站外链带宽有限, 我把 已经下载好的文件整体打包, 欢迎试用
http://pan.baidu.com/s/1jIFbWu6


来源: 加州大学欧文分校 LFD 实验室 Christoph Gohlke
http://www.lfd.uci.edu/~gohlke/pythonlibs/


下载并安装
Visual C++ 2015 (x64 and x86 for CPython 3.5) redistributable packages
https://download.microsoft.com/d ... 8/vc_redist.x86.exe
https://download.microsoft.com/d ... 8/vc_redist.x64.exe


python-3.5.2 官方安装文件:
https://www.python.org/ftp/python/3.5.2/python-3.5.2.exe


非官方包:
NumPy, a fundamental package needed for scientific computing with Python.
Numpy+MKL is linked to the Intel? Math Kernel Library and includes required DLLs in the numpy.core directory.
科学计算基础包, Intel 数学核心库
http://www.lfd.uci.edu/~gohlke/p ... p35-cp35m-win32.whl

PyOpenGL:
http://www.lfd.uci.edu/~gohlke/p ... p35-cp35m-win32.whl

PyOpenGL 加速[可选, 推荐安装]
http://www.lfd.uci.edu/~gohlke/p ... p35-cp35m-win32.whl

将 python 3.5 安装到 D:\python353_32 目录,
将 3 个 .whl 文件都拷贝到 D:\python353_32 目录[只是为了安装文件, 不是必须的]


非官方包 CMD 命令行 安装记录:
  1. D:\python353_32\Scripts\pip.exe install D:\python353_32\numpy-1.11.2rc1+mkl-cp35-cp35m-win32.whl
  2. Processing d:\python353_32\numpy-1.11.2rc1+mkl-cp35-cp35m-win32.whl
  3. Installing collected packages: numpy
  4. Successfully installed numpy-1.11.2rc1+mkl
  5. D:\python353_32\Scripts\pip.exe install D:\python353_32\PyOpenGL-3.1.1-cp35-cp35m-win32.whl
  6. Processing d:\python353_32\pyopengl-3.1.1-cp35-cp35m-win32.whl
  7. Installing collected packages: PyOpenGL
  8. Successfully installed PyOpenGL-3.1.1
  9. D:\python353_32\Scripts\pip.exe install D:\python353_32\PyOpenGL_accelerate-3.1.1-cp35-cp35m-win32.whl
  10. Processing d:\python353_32\pyopengl_accelerate-3.1.1-cp35-cp35m-win32.whl
  11. Installing collected packages: PyOpenGL-accelerate
  12. Successfully installed PyOpenGL-accelerate-3.1.1
复制代码
以上完成后, 仍会遇到一个问题
  1. Traceback (most recent call last):
  2.   File "D:\ttt.py", line 116, in <module>
  3.     main()
  4.   File "D:\ttt.py", line 106, in main
  5.     winid=glutCreateWindow("Vortex")
  6.   File "D:\python353_32\lib\site-packages\OpenGL\GLUT\special.py", line 73, in glutCreateWindow
  7.     return __glutCreateWindowWithExit(title, _exitfunc)
  8. ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
复制代码
解决方案 参考: https://codeyarns.com/2012/04/27/pyopengl-glut-ctypes-error/

将第 106 行:
  1. winid=glutCreateWindow("Vortex")
复制代码
改为
  1. winid=glutCreateWindow( b"Vortex" )
复制代码
运行成功!
2

评分人数

TOP

返回列表