-
Notifications
You must be signed in to change notification settings - Fork 831
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
Unable to run pyexamples on Windows #426
Comments
It sounds as though Pangolin is not trying to build the python library. When you cmake pangolin, you should make sure that it finds python. It should say something like PyBind found and enabled. You can use cmake-gui .. instead of cmake .. to inspect variables and try to provide the correct path to your python install. I admit, I have not tried this on windows, so you may encounter a small bug. |
Hi Steve, Thanks for you reply. I've checked CMAKE-GUI, during "Config" and "Generate". I do not see any variable related with python path nor any leyend saying "PyBind found and enabled", If I search on the UI for "py" the only results are the checkboxes:
I will try to analize this on cmake and see if i can find anything related with PyBind. Thanks |
Hi Steve. If WIN is set pypangolin will not be included. option(BUILD_PANGOLIN_PYTHON "Build support for Pangolin Interactive Console" ON) |
Hmm - I probably did that because it wasn't working or something. Hopefully it will be possible with a little bit of work. |
Steven, I've made some progress but it's not working still. I detele everyhting and start over.
then:
then:
Here i verifyied that pybind11 was found on the CMAKE generation.
Finally i did:
But I've got like 15 errors due to a LINK error, In particular, Fatal error LNK1104: cannot open file 'python27_d.lib. I supposed this was related to the fact that the project was trying to link with some debug version. So i've opened the solution in Visual Studio 2017 and change the project config from Debug to Release. Then I cleaned the solution and recompile evething. Evething compiles ok. I got:
Once again from the console, I've tried to run the example but I got the same result as the fiist time when i opened the issue, Now i do have one pypangolin.dir under C:\dev\Pangolin\build\src that was not created the first time. Directorio de C:\dev\Pangolin\build\src 21/10/2018 01:00 .21/10/2018 01:00 .. 21/10/2018 01:06 CMakeFiles 20/10/2018 23:58 8,749 cmake_install.cmake 21/10/2018 00:03 Debug 20/10/2018 23:58 external 20/10/2018 23:58 790,526 fonts.cpp 20/10/2018 23:58 include 20/10/2018 23:58 11,430 INSTALL.vcxproj 20/10/2018 23:58 512 INSTALL.vcxproj.filters 20/10/2018 23:58 11,814 PACKAGE.vcxproj 20/10/2018 23:58 512 PACKAGE.vcxproj.filters 21/10/2018 00:01 pangolin.dir 20/10/2018 23:58 46,495 pangolin.vcxproj 20/10/2018 23:58 29,211 pangolin.vcxproj.filters 20/10/2018 23:58 1,896 PangolinConfig.cmake 20/10/2018 23:58 642 PangolinConfigVersion.cmake 20/10/2018 23:58 3,541 PangolinTargets.cmake 21/10/2018 01:02 pypangolin.dir 20/10/2018 23:58 37,331 pypangolin.vcxproj 20/10/2018 23:58 5,229 pypangolin.vcxproj.filters 21/10/2018 01:06 Release 13 archivos 947,888 bytes 9 dirs 122,484,195,328 bytes libres C:\dev\Pangolin\build\src> C:\dev\Pangolin\pyexamples>dir Directorio de C:\dev\Pangolin\pyexamples 20/10/2018 23:56 .20/10/2018 23:56 .. 20/10/2018 23:56 1,528 SimpleDisplay.py 20/10/2018 23:56 1,166 SimplePlot.py 20/10/2018 23:56 3,160 SimpleVideo.py 3 archivos 5,854 bytes 2 dirs 122,486,951,936 bytes libres C:\dev\Pangolin\pyexamples>python simpledisplay.py C:\dev\Pangolin\pyexamples> Any Ideas?, |
the location of pypangolin.lib looks to be different on your build, so you will probably have to modify the syspath thing at the top of simpledisplay.py. It needs to point to the folder containing that lib. Have you tried that? |
Hi Steven I've change the code in the examples to point to the correct location as you said. Now this is what happening. I attempted to run each of the examples you provided: SimpleDisplay.py, SimplePlot.py, SimpleVideo.py SimpleDisplay.py, Showed the following error.
SimplePlot.py only showed a black screen. SimpleVideo.py Showed the following error.
So I decided to go back to SimplePlot.py since it was the only one that runned without issues but the program just showed one back screen, luckly when I maximized the windows I saw the plot generation on the window. for the SimpleVideo.py watching on the program source, again first time with python, I can see indeed the program is expecting some parameters but I am not sure what the example is trying to acheive also I am not sure abuout the meanig of '--pango', '--pangoOut' params, What's a pango file? what about '--stream', Could you clarify this to me? I decided to go back to the SimpleDisplay.py and tried to troubleshoot it a little. To make the LONG story short end up checking the result of glGetError()) after each OpengGL call with the following print.
Once I did that at least I was able to see the screen with a portion of the cube, but once again screen was unreponsive until I maximize it or chage it's size in any way, Once I did that I was able to play with the cube and see the button UI, not sure if this is supposed to be a buttons or not. BTW the result from glGetError() is alwyas 1281 in the loop until I resize the window, then result is becomes 0, UI shows up and the cube start to respond to mouse events. Any ideas about this? Also I would like to know more about SimpleVideo.py is possible. Thanks in advace. |
Sorry for the silence. The blank window until resize got fixed in the end. Thanks! |
First let me clarify that I'm a complete newbie with python, so if something is obvious I appologize in advance.
I've followed the steps on the page:
Alter this, results shows:
Time Elapsed 00:11:38.89.
When I try to execute the SimpleDisplay.py from my console using python i get.
C:\dev\Pangolin\pyexamples>python SimpleDisplay.py
Traceback (most recent call last):
File "SimpleDisplay.py", line 4, in
import pypangolin as pango
ImportError: No module named pypangolin
C:\dev\Pangolin\pyexamples>
Analizing the code on the script, i see this.
So what's exactly is it trying to locate in this folder?, I do not find anything that is called pypangolin within the ../build/src folder.
Any ideas?
Regards
The text was updated successfully, but these errors were encountered: