I have installed the Python SDK for the Pepper (as indicated here: http://doc.aldebaran.com/2-5/dev/python/install_guide.html#python-install-guide). I have Mac OS 10.14.3 (Mojave) and running python 2.7. When I am trying to import naoqi, I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/../Cellar/python@2/2.7.16/bin/../Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 539, in <module>
main()
File "/usr/local/bin/../Cellar/python@2/2.7.16/bin/../Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 521, in main
known_paths = addusersitepackages(known_paths)
File "/usr/local/bin/../Cellar/python@2/2.7.16/bin/../Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 266, in addusersitepackages
user_site = getusersitepackages()
File "/usr/local/bin/../Cellar/python@2/2.7.16/bin/../Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 241, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/local/bin/../Cellar/python@2/2.7.16/bin/../Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 231, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 525, in get_config_var
return get_config_vars().get(name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 458, in get_config_vars
import re
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 108, in <module>
import _locale
SystemError: dynamic module not initialized properly
I have added the following lines in my .bash_profile:
export PYTHONPATH=$robotology_dir/pynaoqi-python2.7-2.5.7.1-mac64/lib/python2.7/site-packages:${PYTHONPATH}
export DYLD_LIBRARY_PATH=$robotology_dir/pynaoqi-python2.7-2.5.7.1-mac64/lib:${DYLD_LIBRARY_PATH}
export DYLD_FRAMEWORK_PATH=$robotology_dir/pynaoqi-python2.7-2.5.7.1-mac64:${DYLD_FRAMEWORK_PATH}
I saw that here there was a similar error: Python for Naoqi (dynamic module not initialized properly) I even tried the csrutil status --> and disabled it but still there was no change in the error I received.
Any help would be highly appreciated! Thank you very much!