PyOpenGL Installation - SourceForge
文章推薦指數: 80 %
Most users of PyOpenGL should use pip to install PyOpenGL automatically. It can be installed either to the system Python or a Virtualenv. MostusersofPyOpenGLshouldusepip toinstallPyOpenGLautomatically.Itcanbeinstalledeithertothe systemPythonoraVirtualenv. $pipinstallPyOpenGLPyOpenGL_accelerate ManualInstallation Ifyoucannot,orwouldprefernotto,usepip,youcan downloadthepackagefromPyPI. PyOpenGL PyOpenGL_accelerate PyOpenGLDemo ThepackageusesSetuptools foritsinstallation. $tar-zxvfPyOpenGL-3.1.0.tar.gz $cdPyOpenGL-3.1.0 $pythonsetup.pyinstall Ifyouwouldlikethe(optional)PyOpenGL-acceleratepackage,downloadit fromthePyOpenGL_accelerate PyPIpage andfollowthesamebasicsteps: NotethatyouwillrequireaworkingCcompilerto compilethePyOpenGL-acceleratepackage.Pre-builtpackagesareavailable forMSWindows32andMSWindows64users. $tar-zxvfPyOpenGL-accelerate-3.1.0.tar.gz $cdPyOpenGL-accelerate-3.1.0 $pythonsetup.pyinstall RecommendedEnhancementsforPyOpenGL Numpy GLUTorFreeGLUT Availableasanrpm/deb/ebuildformostmodernLinuxmachines TheWin32andWin64binaryinstallersforPyOpenGLincludeacopy ofGLUT Python ImagingLibrary(PIL)anyrecentversion GLE TheGLExtrusionlibrary,availableonmostLinuxdistributions (libgle3) TheWin32packageofPyOpenGLincludesacopyofGLEcompiledasa DLL NotethatToglsupportisdeprecated, it'sthereforlegacycode(onceyoucompileTogl),butyoushould chooseaGUIlibrarythathasOpenGLsupportbuilt-inforany newdevelopment. Toglsupporthasbeendroppedduetothe complexityofcompilationandtheheadacheofmaintenance. There areprojectswhichattempttoprovideToglsupport,feelfreeto installthoseintoyourPython'sTkinstallationifyouneedToglunder Python. OpenGLContextInstallation OpenGLContextisaverylargepackagethatdependsonalargenumber ofotherpackagestofunction.YoudoNOTneed OpenGLContexttoworkwithPyOpenGL. BasicinstallationofOpenGLContextisasfollows(notethatyoumust explicitlyspecifytheOpenGLContextandPyVRML97releasesastheyarenot currentlyinfinal/productionreleasesonPyPI): $virtualenvoglc-env $sourceoglc-env/bin/activate (oglc-env)$pipinstallPyOpenGLPyOpenGL_accelerate"PyVRML97==2.3.0a4"simpleparsenumpy"OpenGLContext==2.2.0a3"pydispatcherpillow Onceyouhavethedependencies,youcaninstallOpenGLContextitself $pipinstallPyDispatcherPyVRML97OpenGLContext RecommendedEnhancementsforOpenGLContext TTFQuery and FontTools ProvideaccesstoTrueTypefontsstoredinthefilesystem, usedbythe"toolsfont"and"pygamefont"modulesinthe scenegraph/text package. Withoutthesemodules,youwillnothaveaccessto extrudedfonts(toolsfont)orantialiasedbitmapfonts(pygamefont) wxPython and/or PyGame Additionalcontexts/windowingenvironments,onlyGLUTcontexts areavailableotherwise. PyGamealsoprovidesantialiasedbitmapfonts,whilewxPython canprovidealiasedbitmapfontsifnecessary win32all win32uiandwin32conprovidesupportforWGL-basedpolygonal text,onlyavailableforWin32systemsofcourse. TheWGL polygonaltextisnotusedbythescenegraphengine,soitisnot requiredforanythingsaveplayingwiththeWGLpolygonaltext demonstrationmodule. BZR(Developer)Install IfyouwouldliketocontributetoPyOpenGLdevelopmentorjustneed toridethebleedingedge,youwilllikelywanttoworkwitha source-codecheckout. Youwillneedthe Bazaar (bzr)tooltoworkwiththerepository: $bzrbranchlp:pyopengl $cdpyopengl $pythonsetup.pydevelop--user $cdOpenGL_accelerate $pythonsetup.pydevelop--user $cd../../ TocontributetoOpenGLContextdevelopment(ortorunthetests,for instance): $bzrbranchlp:pyvrml97 $cdpyvrml97 $pythonsetup.pydevelop--user $cd../ $bzrbranchlp:openglcontext $cdopenglcontext $pythonsetup.pydevelop--user Tocontributeyourchangesback,eitherpublish yourbranchpublicly(forinstanceonLaunchPad)orcreatea"merge directive"[email protected]: bzrsend-omy-changes.diff Notethatyou'llneedtosubscribetopyopengl-devel topostchangestoit. IfyoupreferyoucansendthemtoMike Fletcherinstead. BuildingDocumentation ThedocumentationbuildsystemiscompletelyrewrittenforPyOpenGL 3.xandisfareasiertouseandfaster (atleastacoupleof ordersofmagnitude)thantheoldJava-baseddocbookprocessor. bzrbranchlp:~mcfletch/pyopengl/directdocscddirectdocs./samples.py./references.py./generate.py./upload.py The lastcommandwillnotworkunlessyouhappentobeme.Youneedthe lxml.etreeandkidpackagesinstalledtorunthegenerator(alsobzr, svn,PyOpenGL,cvs,etceteras).
延伸文章資訊
- 1Need to Install PyOpenGL (Windows) - Stack Overflow
Go to Unofficial Windows Binaries for Python Extension Packages. Download a 32 bit or 64 bit pack...
- 2python 無法使用OpenGL問題error ... - iT 邦幫忙
pip install PyOpenGL pip install PyOpenGL_accelerate-3.1.5-cp38-cp38-win_amd64.whl 並且將 glut64.dll...
- 3How to Install PyOpenGL package on Linux? - GeeksforGeeks
Step 3: Now, install the PyOpenGL package by using pip module. Use the following command to insta...
- 4PyOpenGL · PyPI
PyOpenGL is normally distributed via PyPI using standard pip: $ pip install PyOpenGL PyOpenGL_acc...
- 5Python and PyOpenGL Installation
Use the following instructions to install it. Linux/Mac: Once Anaconda is installed on your Mac/L...