ImportError: Library "GL" not found · Issue #235 - GitHub

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

ReraisedException: Error occured while running from pyglet.gl import * The original exception was: ImportError: Library "GL" not found. Skiptocontent {{message}} openai / baselines Public Notifications Fork 4.4k Star 12.9k Code Issues 398 Pullrequests 84 Actions Projects 0 Security Insights More Code Issues Pullrequests Actions Projects Security Insights Newissue Haveaquestionaboutthisproject?SignupforafreeGitHubaccounttoopenanissueandcontactitsmaintainersandthecommunity. Pickausername EmailAddress Password SignupforGitHub Byclicking“SignupforGitHub”,youagreetoourtermsofserviceand privacystatement.We’lloccasionallysendyouaccountrelatedemails. AlreadyonGitHub? Signin toyouraccount Jumptobottom ImportError:Library"GL"notfound #235 Closed riyaazsopenedthisissue Dec16,2017 ·5comments Closed ImportError:Library"GL"notfound #235 riyaazsopenedthisissue Dec16,2017 ·5comments Comments Copylink riyaazs commented Dec16,2017 Hi, IgetthefollowingerrorwhentryingtorunDQNbaseline. Ihaveopenglalreadyinstalled.andglxgears,glxinfoalreadyworkfine. Iamusingpython3.5. cansomeonepleaseletmeknowhowtofixthis? "python-mbaselines.deepq.experiments.enjoy_cartpole" gym.utils.reraise.ReraisedException:Erroroccuredwhilerunningfrompyglet.glimport* Theoriginalexceptionwas: ImportError:Library"GL"notfound. Thetextwasupdatedsuccessfully,buttheseerrorswereencountered: 👍 4 riccitensor,anishvmonsy,Jmosesee,andchuxiaoyi2018reactedwiththumbsupemoji Allreactions 👍 4reactions Copylink Contributor olegklimov commented Feb5,2018 That'snotabuginthislibrary.Pleasecreateatestfilethatcontainsonlyfrompyglet.glimport*andrunittoreproducethiserrorinisolation.Alsoseedependenciesforgymtoinstallwhatismissing.(somepythonGLstuff) Allreactions Sorry,somethingwentwrong. olegklimov closedthisascompleted Feb5,2018 Copylink ziyangli commented Mar19,2019 • edited Ihavethesameproblem.Itriedthisandnoerroroccurs. Python3.6.3(default,Oct62017,00:00:00) [GCC4.8.4]onlinux Type"help","copyright","credits"or"license"formoreinformation. >>>frompyglet.glimport* >>>gl_lib=pyglet.lib.load_library('GL') >>> >>> ButifIrun python-mbaselines.run--alg=deepq--env=CartPole-v0--load_path=./cartpole_model.pkl--num_timesteps=0--play thenthereisaproblem Instructionsforupdating: Usetf.castinstead. Loadedmodelfrom./cartpole_model.pkl Runningtrainedmodel Traceback(mostrecentcalllast): File"/home/lzy/git/gym/gym/envs/classic_control/rendering.py",line27,in frompyglet.glimport* File"/home/lzy/py3_ws/lib/python3.6/site-packages/pyglet/gl/__init__.py",line100,in frompyglet.gl.libimportGLException File"/home/lzy/py3_ws/lib/python3.6/site-packages/pyglet/gl/lib.py",line143,in frompyglet.gl.lib_glximportlink_GL,link_GLU,link_GLX File"/home/lzy/py3_ws/lib/python3.6/site-packages/pyglet/gl/lib_glx.py",line50,in gl_lib=pyglet.lib.load_library('GL') File"/home/lzy/py3_ws/lib/python3.6/site-packages/pyglet/lib.py",line158,inload_library raiseImportError('Library"%s"notfound.'%names[0]) ImportError:Library"GL"notfound. Duringhandlingoftheaboveexception,anotherexceptionoccurred: Traceback(mostrecentcalllast): File"/usr/lib/python3.6/runpy.py",line193,in_run_module_as_main "__main__",mod_spec) File"/usr/lib/python3.6/runpy.py",line85,in_run_code exec(code,run_globals) File"/home/lzy/git/baselines/baselines/run.py",line252,in main(sys.argv) File"/home/lzy/git/baselines/baselines/run.py",line239,inmain env.render() File"/home/lzy/git/baselines/baselines/common/vec_env/dummy_vec_env.py",line79,inrender returnself.envs[0].render(mode=mode) File"/home/lzy/git/gym/gym/core.py",line244,inrender returnself.env.render(mode,**kwargs) File"/home/lzy/git/gym/gym/core.py",line244,inrender returnself.env.render(mode,**kwargs) File"/home/lzy/git/gym/gym/envs/classic_control/cartpole.py",line150,inrender fromgym.envs.classic_controlimportrendering File"/home/lzy/git/gym/gym/envs/classic_control/rendering.py",line34,in ''') ImportError: Erroroccuredwhilerunning`frompyglet.glimport*` HINT:makesureyouhaveOpenGLinstall.OnUbuntu,youcanrun'apt-getinstallpython-opengl'. Ifyou'rerunningonaserver,youmayneedavirtualframebuffer;somethinglikethisshouldwork: 'xvfb-run-s"-screen01400x900x24"python' 👍 1 JZ76reactedwiththumbsupemoji 🎉 1 cosmir17reactedwithhoorayemoji Allreactions 👍 1reaction 🎉 1reaction Sorry,somethingwentwrong. Copylink Deastan commented Jun4,2019 • edited Hieveryone, Ihaveexactlythesameissueas@ziyangliandsameerrormessage.Didsomeonefindasolution? Kindregards, John EDIT: Ihaveaddedfrompyglet.glimport*inthemainscriiptanditworks.Istilldon'tgetit..butitworks. RE-EDIT: Createsomenewissueslater: [roboticlab14:09886]***Processreceivedsignal***[roboticlab14:09886]Signal:Segmentationfault(11)[roboticlab14:09886]Signalcode:Invalidpermissions(2)[roboticlab14:09886]Failingataddress:0x845b60[roboticlab14:09886][0]/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7fe7e4f6f330][roboticlab14:09886][1]python3.6()[0x845b60][roboticlab14:09886]***Endoferrormessage***Segmentationfault(coredumped) Allreactions Sorry,somethingwentwrong. Deastan mentionedthisissue Jun6,2019 ubuntu14:errorswithSignal:Segmentationfault hill-a/stable-baselines#357 Closed Copylink ghost commented Nov19,2019 Hi Ihavealmostsameissuewith@ziyangli. IfIrunjustonly frompyglet.glimport* there'snoerror. ButifIrunabovelineinrendering.pywithgym.Wrapper,there'ssameimporterror. Doesanyoneknowhowtofixorimprove? Allreactions Sorry,somethingwentwrong. Copylink ariel415el commented Jun3,2020 • edited Thanks@Deastan! addingfrompyglet.glimport*inthemainscriiptdidthetrickforme 👍 1 cosmir17reactedwiththumbsupemoji Allreactions 👍 1reaction Sorry,somethingwentwrong. cosmir17 mentionedthisissue Nov14,2020 Fixissue#274 pyglet/pyglet#284 Merged Signupforfree tojointhisconversationonGitHub. Alreadyhaveanaccount? Signintocomment Assignees Nooneassigned Labels Noneyet Projects Noneyet Milestone Nomilestone Development Nobranchesorpullrequests 5participants Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.



請為這篇文章評分?