DLR-RM / AugmentedAutoencoder

Official Code: Implicit 3D Orientation Learning for 6D Object Detection from RGB Images
MIT License
339 stars 97 forks source link

ImportError: /home/edison/anaconda2/lib/python2.7/site-packages/cyglfw3/glfw3.so: undefined symbol: PyFPE_jbuf #4

Closed SonOfCoding closed 5 years ago

SonOfCoding commented 5 years ago

Hi, After training. I try to do the testing for duck in LINEMOD dataset. (edison@amax-server:~/edison/aae/AugmentedAutoencoder/auto_pose/test$ python aae_image.py exp_group/my_autoencoder -f /home/edison/edison/aae/AugmentedAutoencoder/LINEMOD/duck/JPEGImages ) However, I get this error. Could you please give me a help? Thank you.

Traceback (most recent call last): File "aae_image.py", line 50, in pred_view = dataset.render_rot( R,downSample = 1) File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 193, in render_rot bgr_y, depth_y = self.renderer.render( File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/ae/utils.py", line 15, in decorator setattr(self, attribute, function(self)) File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 62, in renderer from auto_pose.meshrenderer import meshrenderer, meshrenderer_phong File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/meshrenderer/meshrenderer.py", line 7, in import gl_utils as gu File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/meshrenderer/gl_utils/init.py", line 3, in from .glfw_offscreen_context import OffscreenContext File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/meshrenderer/gl_utils/glfw_offscreen_context.py", line 7, in import cyglfw3 as glfw File "/home/edison/anaconda2/lib/python2.7/site-packages/cyglfw3/init.py", line 7, in from .glfw3 import * ImportError: /home/edison/anaconda2/lib/python2.7/site-packages/cyglfw3/glfw3.so: undefined symbol: PyFPE_jbuf

MartinSmeyer commented 5 years ago

Hi!

seems like the anaconda cyglfw3 version is referenced.

Do you have multiple installs of cyglfw3, i.e. pip and conda?

Try:

pip show cyglfw3

If it shows another cyglfw3, uninstall it:

pip uninstall cyglfw3

Alternatively, try to uninstall cyglfw3 in conda and (re-)install it via pip.

SonOfCoding commented 5 years ago

After pip show cyglfw3, edison@amax-server:~/edison/aae/AugmentedAutoencoder/AE_WORKSPACE_PATH$ pip show cyglfw3 Name: cyglfw3 Version: 3.1.0.2 Summary: Python bindings for GLFW 3+ using Cython Home-page: http://github.com/adamlwgriffiths/cyglfw3 Author: Adam Griffiths Author-email: UNKNOWN License: BSD Location: /home/edison/anaconda2/lib/python2.7/site-packages Requires: Cython

and I can see in conda list, there is one exists. However, the build channel is pip. I pip uninstall it and re-run ae_embed exp_group/my_autoencoder, the error says : ImportError: No module named cyglfw3 I pip install it again, and the error becomes:

*Creating embedding .. Traceback (most recent call last):92232 ] | | (ETA: --:--:--) File "/home/edison/anaconda2/bin/ae_embed", line 11, in load_entry_point('auto-pose==0.9', 'console_scripts', 'ae_embed')() File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/ae/ae_embed.py", line 83, in main codebook.update_embedding(sess, batch_size) File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/ae/codebook.py", line 206, in update_embedding batch, obj_bbs_batch = self._dataset.render_embedding_image_batch(a, e) File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 333, in render_embedding_image_batch bgr_y, depth_y = self.renderer.render( File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/ae/utils.py", line 15, in decorator setattr(self, attribute, function(self)) File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 62, in renderer from auto_pose.meshrenderer import meshrenderer, meshrenderer_phong File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/meshrenderer/meshrenderer.py", line 7, in import gl_utils as gu File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/meshrenderer/gl_utils/init.py", line 3, in from .glfw_offscreen_context import OffscreenContext File "/home/edison/anaconda2/lib/python2.7/site-packages/auto_pose/meshrenderer/gl_utils/glfw_offscreen_context.py", line 7, in import cyglfw3 as glfw File "/home/edison/anaconda2/lib/python2.7/site-packages/cyglfw3/init.py", line 7, in from .glfw3 import ImportError: /home/edison/anaconda2/lib/python2.7/site-packages/cyglfw3/glfw3.so: undefined symbol: PyFPE_jbuf**

I am sorry that this problem may bother you. Could you please give me a help? Thank you very much

MartinSmeyer commented 5 years ago

so do you use pip only inside your conda environment? Or do you have another system pip running outside conda? If so please run the above steps outside conda.

Could you try to remove the conda environment paths from your bash profile and run the installation using the native pip? To determine whether the problem is with anaconda. I have not tested it using anaconda.

Also check your cython installation and try pip uninstall cython conda install cython or vice versa

Many similar issues point to conflicts between the python distributions (pip, conda, etc.): https://github.com/scikit-learn/scikit-learn/issues/7542 https://stackoverflow.com/questions/36190757/numpy-undefined-symbol-pyfpe-jbuf

mengfansheng16 commented 5 years ago

if your Ubuntu System hasn't the cyglfw3 package, you should run

first. install the libglfw3-dev files by: "sudo apt-get install libglfw3-dev" then, install the cyglfw3 package by: "sudo pip3 install cyglfw3"

maybe solve the following errors: ERROR:cyglfw3/glfw3.c:632:10: fatal error: GLFW/glfw3.h: No such file or directory ERROR: setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

MartinSmeyer commented 5 years ago

@mengfansheng16 First step retrieving glfw3 is correct Second step should use python 2.7, i.e. pip2

mengfansheng16 commented 5 years ago

@MartinSmeyer Is this paper end-to-end? thank you

MartinSmeyer commented 5 years ago

@MartinSmeyer Is this paper end-to-end? thank you

No, please check the Overview. This is also an off-topic question.