TABLE OF CONTENTS
INSTALLING THE SDK
WINDOWS
- Python
Make sure to download Python 2.7.
You can find the installer here: http://python.org/download/
NAOqi for Python
Extract:
pynaoqi-python2.7-2.8.x.x-win64-vs2015-xxxxx.zip
You can download the latest release from Developer Center website. For further details, see: Downloading & Installing SoftBank Robotics Software.
Set the following environment variables:
Environment variable | Value |
PYTHONPATH | path\to\python-sdk\lib |
- Windows 7
From the Desktop, right-click the Computer icon and select Properties. If you don’t have a Computer icon on your desktop, click the Start button, right-click the Computer option in the Start menu, and seect Properties.
Windows 8
From the Desktop, right-click the very bottom left corner of the screen and click System.
- Click the Advanced System Settings link in the left column.
- In the System Properties window, click on the Advanced tab, then click the Environment Variables button near the bottom of that tab.
- In the Environment Variables window, add a new User variable:
PYTHONPATH
and set it to:
path\to\python-sdk\lib
- Download and install the "Microsoft Visual C++ 2010 Redistribuable Package (x86)".
(You can skip this step if you already have installed Choregrahe).
MAC
- Make sure the System Integrity Protection is disabled.
For further details, see: [Apple] Configuring System Integrity Protection.
Python
Install Python 2.7 from Python.org
- Make sure to use Python from
/usr/local/bin/python
, not/usr/bin/python
- NAOqi for Python
Extract:
pynaoqi-python-2.7-naoqi-x.x-mac64.tar.gz
You can download the latest release from Developer Center website. For further details, see: Downloading & Installing SoftBank Robotics Software.
Set the following environment variables:
Environment variable | Value |
PYTHONPATH | /path/to/python-sdk/lib/python2.7/site-packages |
DYLD_LIBRARY_PATH | /path/to/python-sdk/lib |
QI_SDK_PREFIX | /path/to/python-sdk |
By doing for example:
$ export PYTHONPATH=${PYTHONPATH}:/path/to/python-sdk/lib/python2.7/site-packages $ export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/path/to/python-sdk/lib $ export QI_SDK_PREFIX=/path/to/python-sdk
- Optionally, re-enable System Integrity Protection.
LINUX
- Python
Make sure to install Python2.7. There are many distributions shipped with Python3 by default, so you should make sure to install the
python2
package. NAOqi for Python
Extract:
pynaoqi-python-2.7-naoqi-x.x-linux32.tar.gz
You can download the latest release from Developer Center website. For further details, see: Downloading & Installing SoftBank Robotics Software.
- Set the following environment variables:
Environment variable | Value |
PYTHONPATH | /path/to/python-sdk/lib/python2.7/site-packages |
QI_SDK_PREFIX | /path/to/python-sdk |
By doing for example :
$ export PYTHONPATH=${PYTHONPATH}:/path/to/python-sdk/lib/python2.7/site-packages $ export QI_SDK_PREFIX=/path/to/python-sdk
CHECKING THE INSTALLATION OF THE PYTHON SDK
WINDOWS
Run the default IDE (IDLE) that comes with the python installer.
MAC
- Make sure to use /usr/local/bin/python
- Try to run :
import naoqi
LINUX
Simply run :
import naoqi
If you do not get any error message, congratulations ! You are now ready to use the Python SDK.
If you do get an error message, please see : Python SDK - Troubleshooting.
NOTE FOR PREVIOUS 1.10 USERS
Previously, 1.10 users did not have a separate Python SDK and had to set PYTHONPATH to naoqi/sdk/lib.
This method will not work anymore, so please do use the new Python SDK.