-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for 'GLEW initalization error' #145
Conversation
Hi, @lobachevzky |
I'm facing the GLEW initialization error too. Can someone merge this into the main repo? |
Actually, no. It creates some other error: doing |
@agakshat that seems like a different (and new?) error, and might be worth filing a separate issue on |
I meant checking out this Branch gives me that error. The main
`openai/mujoco-py` master does not give me this new error.
…On Oct 30, 2017 05:29, "Alex Ray" ***@***.***> wrote:
@agakshat <https://github.com/agakshat> that seems like a different (and
new?) error, and might be worth filing a separate issue on
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#145 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJo7PJla1PCKUrB2zOGt8lqA_WlmZ9mmks5sxZbvgaJpZM4P4z4W>
.
|
@foolyc I get the same problem. Here are the errors I get:
Here's a picture of the distorted image: I posted about this issue previously: #133 (comment) What I figured out is that rendering onscreen and offscreen works if they both use glfw. I implemented a somewhat hacky fix in . The way I read arrays using this code is
But this is not great because:
This is a problem I am continuing to investigate. It might be illuminating to look at my conversation with Emo about this on the mujoco forum: |
This fixes the distorted image problem, so everything should work with |
@agakshat, that function is defined in |
So the full traceback is as follows:
Note: |
@agakshat judging from the traceback, it looks like you are using a different version of the code than I am. For example, I execute |
One thing that would help me debug the issues with EGL is if I had a working makefile for |
@lobachevzky are you able to build the eglshim in a docker container? I think the dockerfile has all of the pre-requisites, including a cpu-only GL library implementation. |
@machinaut, I'm not sure how I could use docker to get the correct build command. To clarify what I am after, I have a small working example using raw mujoco code and glfw. I would like that code to call the function
This confuses me because according to As for Docker, I cannot get it to work with my Any tips on the build command or on getting docker to work with mujoco are welcome. |
…dth in sim.render
I've been trying to adapt the
So, for the first, So are these actually errors in |
@Kukanani Thanks a lot! Works for me on Ubuntu 16.04, Python 3.5.2, cuda 9.1 |
@Kukanani Thanks a lot. |
all these efforts and wealth of information should be reflected into some docs or manual regarding particular errors. BTW I'm still having issues:
|
@Kukanani Hi, thank you for your answer. It works for me. I want to know is there any other way to solve this more elegant? By the way, if I want to use this command and debug code in PyCharm, how should I setting this in config/run configurations page given that "LD_PRELOAD....." is a prefix command? I set this in .bashrc, but it seems that PyCharm can't recognize this. so I have to use this command explicitly. |
I'm glad it's working for some folks. Happy to help. I also use command line, not PyCharm, so I'm not sure how you would set that up. I guess one easy way is to just always run from the built in PyCharm console :) |
@Kukanani |
@mjlbach Thankyou for your solution. For env.render() to work normally when using mujoco_py in gym, try these steps:
Then the following code example could work:
|
@GrazyThinking This works for me. Thanks! |
To update what's happening to my case for 2 I don't have libGL.so under /usr/lib/nvidia-39*/ (I don't even have this folder), but when I searched the whole file system, libGL.so is actually located in /usr/lib/x86_64-linux-gnu open .bashrc |
I have done all of the suggestions on this page and still get the GLEW initialization error message. Any other ideas? |
Answering my own question here -- my issue was that I was using NVidia binary drivers (download from their web site). once I switched to ubuntu repository version of nvidia drivers, everything works fine with the suggestions above. |
If you don't have |
Whoa! Man, that sure did work for me! thank you @inspirepassion For those who might encounter this in the future I will summarise what I understood : In the end, after getting the result, when you think about it it's all in the error report itself
GLEW initialization error -> solved by : /home/[username]/[path_to_libGLEW]/libGLEW.so
finally to add in .bashrc |
My problem is same as yours, Have you resolve the problem of |
I meet the same problem. The path of |
are you working in local python environment or anaconda environment ? When you add the path please make sure that it is from the respective environment location. There might be more than one |
I tried to check if libGLEW or libGL where listed in any of my anaconda environments: I tried to copy them from system paths to anaconda paths as shown below but got the same result...
|
Hi @rojas70 ,
I do not remember the exact dependencies but you can try installing these in your anaconda virtual environment. This should install libGL and libGLEW in your anaconda environment. Then add path to these in your .bashrc. |
*Found a fix. First will list how I had failed and at the end, what helped me solve this. After finishing the install, I notice that on the conda side, I have the follow
But not The error persists in both conda and non-conda environments. The
I am sure that the libraries are properly installed in the system. Running a C executable from the mujoco2 bin folder (with the makefile including an -L tag that includes either the local copy or the /usr/lib/x86_64-linux-gnu path:
Yields:
A mujoco_py version demo yields a slightly different output:
i.e. namely I can run *Found a fix:
I wonder if in fact it was the nvidia driver or something also that reset after a reboot? |
This fixes this issue: #44 (comment). However, I'm not sure what the impacts of taking out
glewegl
are, or if this will cause issues on other systems. Let me know if there are some checks that I should add to determine whether to useglew
orglewegl
.