stepjam / PyRep

A toolkit for robot learning research.
MIT License
683 stars 162 forks source link

Error - undefined symbol: simAddLog #252

Closed guilhermecano closed 3 years ago

guilhermecano commented 3 years ago

Good afternoon! Yesterday I tried to instal the most recent version of PyRep, but it is not working. It seems to have a problem with simAddLog in both CoppeliaSim 4.0.0 and CopeliaSim 4.1.0. The package version and the error that appears when I am trying to import PyRep are presented below:

Name: PyRep Version: 4.1.0

Python 3.7.9 (default, Aug 18 2020, 06:22:45) [GCC 7.5.0] on linux

>>> from pyrep import pyrep
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/gui/Dsc/tools/PyRep/pyrep/__init__.py", line 6, in <module>
    from .pyrep import PyRep
  File "/home/gui/Dsc/tools/PyRep/pyrep/pyrep.py", line 3, in <module>
    from pyrep.backend import sim, utils
  File "/home/gui/Dsc/tools/PyRep/pyrep/backend/sim.py", line 2, in <module>
    from ._sim_cffi import ffi, lib
ImportError: /home/gui/Dsc/tools/PyRep/pyrep/backend/_sim_cffi.cpython-37m-x86_64-linux-gnu.so: undefined symbol: simAddLog

Does anyone know why this error occurs? Thank you!

stepjam commented 3 years ago

Looks like a PyRep - CoppeliaSim version mismatch. The version numbers should match up. Make sure that when you install PyRep, that LD_LIBRARY_PATH points to the correct CoppeliaSim version.

guilhermecano commented 3 years ago

I just verified again and yes, it is pointing to CopeliaSim 4.1.0 (rev 0 - Ubuntu 18).

export COPPELIASIM_ROOT=/home/gui/Dsc/tools/CoppeliaSim_Edu_V4_1_0_Ubuntu18_04
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COPPELIASIM_ROOT
export QT_QPA_PLATFORM_PLUGIN_PATH=$COPPELIASIM_ROOT

I double-checked with cd $COPPELIASIM_ROOT and I also echoed the LD_LIBRARY_PATH, it seems ok. If it is not a common problem among PyRep users, there may be something wrong here. I will keep on trying to run it and maybe try it on another machine with Ubuntu 20.

nanbaima commented 3 years ago

Hey @guilhermecano,

I think I had this problem, and it was with sim_cffi I'm not sure now, but I've installed it on hard code (instead of pip install .) and I think it solves this problem. Maybe @refalguera had a similar problem as well.

stepjam commented 3 years ago

OK, and have you tried reinstalling PyRep (rerunning pip install .) ?

refalguera commented 3 years ago

Hey @guilhermecano,

Try using python 3.7.7, with this version of python my cffi related problems have stopped. If it doesn't work, try installing PyRep using python setup.py install, it worked for me.

guilhermecano commented 3 years ago

@stepjam Yes, I tried with both pip install -e . and python setup.py install, but I still got the same error. I guess will try it on another PC to ensure there is nothing wrong with my python version, my pc, or the way I installed it.

guilhermecano commented 3 years ago

@refalguera Thanks. I will try it :)

Edit: It worked when installed in python 3.7.7. Thanks, Re!