Installing Python Sdk For Nao Robots
Solution 1:
Suppose you have naoqi installed in /home/user/naoqi
1.- Open a text editor (Kate, Gedit,... whatever)
2.- Open the file /home/user/.profile
3.- At the end of the file, add the following line
export PYTHONPATH=${PYTHONPATH}:/home/user/naoqi
4.- Reboot (Close your session and login again also works, but just to be sure)
NOTE: Remember to change /home/user/naoqi with the correct path
Solution 2:
I had this issue for a while until I came across the Python SDK - Troubleshooting page which states that the path to the naoqi.py file that should be on your PYTHONPATH is /path/to/python-sdk/lib/python2.7/site-packages
I added the following line to my .bashrc file
export PYTHONPATH=${PYTHONPATH}:/path/to/naoqi/lib/python2.7/site-packages
and then ran source .bashrc
in the terminal.
You can test if the path has been added correctly by running the following lines of code in a python2 terminal.
import sys
print"\n".join(sys.path)
You should see your above path in the list.
Lastly try import naoqi
in a python2 terminal to confirm.
Post a Comment for "Installing Python Sdk For Nao Robots"