Importerror Library Quotgluquot Not Found - FaqCode4U.com

文章推薦指數: 80 %
投票人數:10人

ImportError: Library "GLU" not found ... glu_lib = pyglet.lib.load_library('GLU') ... raise ImportError('Library "%s" not found.' % names[0]) Home ›ImagesLibrary ›VideosLibrary Categories ›javascript ›python ›java ›c# ›php ›android ›html ›jquery ›c++ ›css ›ios ›mysql ›sql ›node.js ›arrays PHP Javascript C++ Ruby .net Git Search QuestionsRelatedTo: python-3.x  ›Whatnetfilesshouldbeexcludedfromsourcecontrol  ›Goodpracticesofsqlservernvarcharmaxperformance  ›Thecontrollerforpath39appletouchicon120x120precomposedpng39wasnotfound  ›Ah00136servermustrelinquishstartupprivilegesbeforeacceptingconnectionspleaseensuremodunixdorothersystemsecuritymoduleisloaded  ›Checkingjtextfieldcharacters Tags python-3.x ImporterrorLibraryQuotgluquotNotFound Home Python-3.x ImporterrorLibraryQuotgluquotNotFound ImportError:Library"GLU"notfound Tags: python-3.x Answers: | Viewed11,442times OnCentOS7.5system,runpython3andexecutethefollowingcode:importgymimporttimeenv=gym.make('CartPole-v0')observation=env.reset()count=0fortinrange(100):action=env.action_space.sample()observation,reward,done,info=env.step(action)ifdone:breakenv.render()count+=1time.sleep(0.2)Reportthefollowingerrorafterexecutingtheabovecode:Traceback(mostrecentcalllast):File"",line6,inFile"/root/gym/gym/core.py",line284,inrenderreturnself.env.render(mode)File"/root/gym/gym/envs/classic_control/cartpole.py",line106,inrenderfromgym.envs.classic_controlimportrenderingFile"/root/gym/gym/envs/classic_control/rendering.py",line25,inreraise(prefix="Erroroccuredwhilerunning`frompyglet.glimport*`",suffix="HINT:makesureyouhaveOpenGLinstall.OnUbuntu,youcanrun'apt-getinstallpython-opengl'.Ifyou'rerunningonaserver,youmayneedavirtualframebuffer;somethinglikethisshouldwork:'xvfb-run-s\"-screen01400x900x24\"python'")File"/root/gym/gym/utils/reraise.py",line17,inreraisereraise_impl(e,traceback)File"/root/gym/gym/utils/reraise_impl_py3.py",line4,inreraise_implraisee.with_traceback(traceback)fromNoneFile"/root/gym/gym/envs/classic_control/rendering.py",line23,infrompyglet.glimport*File"/root/anaconda3/envs/gymlab/lib/python3.6/site-packages/pyglet/gl/__init__.py",line100,infrompyglet.gl.libimportGLExceptionFile"/root/anaconda3/envs/gymlab/lib/python3.6/site-packages/pyglet/gl/lib.py",line143,infrompyglet.gl.lib_glximportlink_GL,link_GLU,link_GLXFile"/root/anaconda3/envs/gymlab/lib/python3.6/site-packages/pyglet/gl/lib_glx.py",line51,inglu_lib=pyglet.lib.load_library('GLU')File"/root/anaconda3/envs/gymlab/lib/python3.6/site-packages/pyglet/lib.py",line158,inload_libraryraiseImportError('Library"%s"notfound.'%names[0])gym.utils.reraise.ReraisedException:Erroroccuredwhilerunning`frompyglet.glimport*`Theoriginalexceptionwas:ImportError:Library"GLU"notfound.HINT:makesureyouhaveOpenGLinstall.OnUbuntu,youcanrun'apt-getinstallpython-opengl'.Ifyou'rerunningonaserver,youmayneedavirtualframebuffer;somethinglikethisshouldwork:'xvfb-run-s"-screen01400x900x24"python'Accordingtotheerrorprompt,afterinstallingOpenGL,therunningcodewillstillreportthesameerror.ThefollowingistheprocessofinstallingOpenGL:[[email protected]~]#yum-yinstallpython-openglLoadedplugins:fastestmirror,langpacksLoadingmirrorspeedsfromcachedhostfile*base:mirrors.aliyun.com*extras:mirrors.tuna.tsinghua.edu.cn*updates:ftp.iij.ad.jpPackagePyOpenGL-3.0.1-6.el7.noarchalreadyinstalledandlatestversionNothingtodo[[email protected]~]# Askedby Jackon SomeCodeAnswers importgymimporttimeenv=gym.make('CartPole-v0')observation=env.reset()count=0fortinrange(100):action=env.action_space.sample()observation,reward,done,info=env.step(action)ifdone:breakenv.render()count+=1time.sleep(0.2) Traceback(mostrecentcalllast):File"",line6,inFile"/root/gym/gym/core.py",line284,inrenderreturnself.env.render(mode)File"/root/gym/gym/envs/classic_control/cartpole.py",line106,inrenderfromgym.envs.classic_controlimportrenderingFile"/root/gym/gym/envs/classic_control/rendering.py",line25,inreraise(prefix="Erroroccuredwhilerunning`frompyglet.glimport*`",suffix="HINT:makesureyouhaveOpenGLinstall.OnUbuntu,youcanrun'apt-getinstallpython-opengl'.Ifyou'rerunningonaserver,youmayneedavirtualframebuffer;somethinglikethisshouldwork:'xvfb-run-s\"-screen01400x900x24\"python'")File"/root/gym/gym/utils/reraise.py",line17,inreraisereraise_impl(e,traceback)File"/root/gym/gym/utils/reraise_impl_py3.py",line4,inreraise_implraisee.with_traceback(traceback)fromNoneFile"/root/gym/gym/envs/classic_control/rendering.py",line23,infrompyglet.glimport*File"/root/anaconda3/envs/gymlab/lib/python3.6/site-packages/pyglet/gl/__init__.py",line100,infrompyglet.gl.libimportGLExceptionFile"/root/anaconda3/envs/gymlab/lib/python3.6/site-packages/pyglet/gl/lib.py",line143,infrompyglet.gl.lib_glximportlink_GL,link_GLU,link_GLXFile"/root/anaconda3/envs/gymlab/lib/python3.6/site-packages/pyglet/gl/lib_glx.py",line51,inglu_lib=pyglet.lib.load_library('GLU')File"/root/anaconda3/envs/gymlab/lib/python3.6/site-packages/pyglet/lib.py",line158,inload_libraryraiseImportError('Library"%s"notfound.'%names[0])gym.utils.reraise.ReraisedException:Erroroccuredwhilerunning`frompyglet.glimport*` ImportError:Library"GLU"notfound.HINT:makesureyouhaveOpenGLinstall.OnUbuntu,youcanrun'apt-getinstallpython-opengl'.Ifyou'rerunningonaserver,youmayneedavirtualframebuffer;somethinglikethisshouldwork:'xvfb-run-s"-screen01400x900x24"python' [[email protected]~]#yum-yinstallpython-openglLoadedplugins:fastestmirror,langpacksLoadingmirrorspeedsfromcachedhostfile*base:mirrors.aliyun.com*extras:mirrors.tuna.tsinghua.edu.cn*updates:ftp.iij.ad.jpPackagePyOpenGL-3.0.1-6.el7.noarchalreadyinstalledandlatestversionNothingtodo[[email protected]~]# #aptsystems-Ubuntu,Debianaptinstallfreeglut-devel#yum-Centosyum-yinstallfreeglut-devel sudoaptinstallfreeglut3-devfreeglut3libgl1-mesa-devlibglu1-mesa-devlibxext-devlibxt-devsudoaptinstallpython3-opengllibgl1-mesa-glxlibglu1-mesa MoreAnswersRelatedImporterrorLibraryQuotgluquotNotFound ImportError:Library"GLU"notfound-StackOverflow 2daysago 1.Note:Tosomeonewhocomeswanderinginandcan'tfindasolutiononLinux.First,installthefollowing:sudoaptinstallfreeglut3-devfreeglut3libgl1-mesa-devlibglu1-mesa-devlibxext-dev… ›Reviews:6 Showdetails Previewsite ImportError:Library"GLU"notfoundandErroroccurred… 1dayago Mar16,2021 ·IamtryingAtariBreakoutgame.ItlookslikeitdoesnotworkwellwithColabandWindows.Workingonschoolcloud.importgym#Createenvironmentenv=… Showdetails Previewsite ImportError:Library"GLU"notfound·Issue#11·… 1weekago Dec09,2020 ·raiseImportError('Library"%s"notfound.'%names[0])ImportError:Library"GLU"notfound.Ireferencedsomemethodsapt-getinstallfreeglut3-devbutitdidn'twork,… Showdetails Previewsite ImportError:Library"GL"notfound#235-GitHub 2daysago Dec16,2017 ·commentedonDec16,2017.olegklimovclosedthisascompletedonFeb5,2018.DeastanmentionedthisissueonJun6,2019.ubuntu14:errorswithSignal:… Showdetails Previewsite [Solved]ImportError:MagickWandsharedlibrarynot… 1weekago Nov26,2021 ·jfqvAsks:ImportError:MagickWandsharedlibrarynotfound[windows]Goodmorning,Afteralotofattempsrunningfromwand.imageimportImageIgetthefollowingerror:… Showdetails Previewsite ›Seealso: Windows Image Whydoesthe'ImportError:MagickWandsharedlibrary… 1weekago Answer(1of4):indexmodules|next|previous|Wand»InstallationInstallationWanditselfcanbeinstalledfromPyPIusingpip:$pipinstallWandWandisaPythonbindingofImageMagick,so… Showdetails Previewsite "Library"GLU"notfound"whileusingopenaAIgym 1weekago Aug31,2021 ·HINT:makesureyouhaveOpenGLinstalled.OnUbuntu,youcanrun'apt-getinstallpython-opengl'.Ifyou'rerunningonaserver,youmayneedavirtualframebuffer;… Showdetails Previewsite ›Seealso: Python UnderstandingtheFunctionsofImportErrorinPython 1weekago PythonTrainingProgram(36Courses,13+Projects)40OnlineCourses.13Hands-onProjects.215+Hours.VerifiableCertificateofCompletion.LifetimeAccess Showdetails Previewsite Library"GLU"notfound-narkive 3daysago load_libraryraiseImportError('Library"%s"notfound.'%names[0])ImportError:Library"GLU"notfound.Continuereadingonnarkive:Searchresultsfor'Library"GLU"notfound'… Showdetails Previewsite ImportError:Library"GL"notfound.-mail-archive.com 1weekago Nov21,2009 ·ImportError:Library"GL"notfound.ValentinosSat,21Nov200913:11:46-0800.I'mtryingtoinstallpygletonPython2.5.1onSolaris10.Whentryingtorunatest… Showdetails Previewsite ImportError:Library"GL"notfound.-mail-archive.com 2daysago Oct29,2011 ·IreceivedthefollowingmessagetryingtorunPyglet.>>>window=pyglet.window.Window()Traceback(mostrecentcalllast):File"",line1,in… Showdetails Previewsite Pleaseleaveyouranswerhere: Submit Recentlysearched  ›Sklearnextratreesclassifier  ›Objectivechowtoaddamethodtoanexistingclass  ›Hibernateconfigurationclasswithmultipledatasource  ›Classconstructornotworking  ›Discoursedockercontainer  ›Selectorglobalclassisnotpurepureselectorsmustcontainatleastone  ›Jsonparseerrorcannotconstructinstanceofclass  ›Classdiagramsymbolsandmeaning  ›Freeitclasses  ›Understandingwithstatementtocatchvalueerrorinunittestclass  ›Howtocreatesparksessionwithhivesupportfailswithhiveclassesarenotf  ›Intraclasscorrelationsascode DonateForUs Ifyouloveus?YoucandonatetousviaPaypalorbuymeacoffeesowecanmaintainandgrow!Thankyou! DonateUsWith FAQsImporterrorLibraryQuotgluquotNotFound? 1.HowtoimportamoduleintoaPythonlibrary? Sotodothisweuse“import”keywordsuchasimportstatementwiththemodulename.WhenwritingthisstatementandthespecifiedmoduleisnotwrittenproperlyortheimportedmoduleisnotfoundinthePythonlibrarythenthePythoninterpreterthrowsanerrorknownasImportError.TherearetwoconditionswhentheImportErrorwillberaised. 2.Whynomodulenamed“request”isthrowninimporterror? ThereforeitthrowsanImportErrorwhichgivesthemessagesayingnomodulenamed“request”.Aseachmodulewhendownloadedorinbuiltithasitsownprivatesymboltablewherealldefinedmoduleissavedbycreatingseparatenamespace.Thereforeifthemoduleispresentthenthereisnooccurrenceofsucherror. 3.WhatisanimporterrorinPython? InPython,ImportErroroccurswhenthePythonprogramtriestoimportmodulewhichdoesnotexistintheprivatetable.Thisexceptioncanbeavoidedusingexceptionhandlingusingtryandexceptblocks.WealsosawexamplesofhowtheImportErroroccursandhowitishandled.ThisisaguidetoPythonImportError. 4.HowtoavoidimporterrorinPython? InPython,ImportErroroccurswhenthePythonprogramtriestoimportmodulewhichdoesnotexistintheprivatetable.Thisexceptioncanbeavoidedusingexceptionhandlingusingtryandexceptblocks.Wealsosawexamples × Signuptoenterthelatestinformation Register Cancel Wasthisinformationusefultoyou?   Close × Getthelatestnotificationsfromourwebsite Register Cancel Didthisinformationworkforyou?   Close



請為這篇文章評分?