Python SDK Install Guide

See also

Overview | C++ | Python | .Net | Java | Matlab | Urbi

Python SDK | Python SDK Install Guide | Python tutorials | Python Examples | Python SDK tips and tricks


Installing the SDK

Windows

Step Action

Python

Make sure to download Python 2.7 - 32 bits.

You can find the installer here: http://python.org/download/

Retrieve and run the NAOqi for Python installer: pynaoqi-python-2.7-naoqi-x.x.win32.exe

You can download the latest release from the Aldebaran Community Website.

Mac

Step Action

Python

Choose between these 2 options:

  • Use the release of Python that comes by default with MacOS:
    • Python 2.6 with OS X 10.6.4 (Snow Leopard),
    • Python 2.7 with , OS X 10.7.1 (Lion)

or

NAOqi for Python

According to your choice, extract:

  • pynaoqi-python-2.6-naoqi-x.x-mac64.tar.gz or
  • pynaoqi-python-2.7-naoqi-x.x-mac64.tar.gz

You can download the latest release from the Aldebaran Community Website.

Set the environnement variable PYTHONPATH to /path/to/python-sdk

Linux

Step Action

Python

Choose between these 2 options:

  • if you are running Ubuntu Lucid to Maverick, use the python-2.6 package,
  • for Ubuntu Natty and later, use the python-2.7 packages.

You can find the installer here: http://python.org/download/

NAOqi for Python

According to your choice, extract:

  • pynaoqi-python-2.6-naoqi-x.x-linux32.tar.gz or
  • pynaoqi-python-2.7-naoqi-x.x-linux32.tar.gz

You can download the latest release from the Aldebaran Community Website.

Set the environnement variable PYTHONPATH to /path/to/python-sdk

By doing for example:

$ export PYTHONPATH=${PYTHONPATH}:/path/to/python-sdk

Checking the installation of the Python SDK

Windows

Run the default IDE (IDLE) that comes with the python installer.

Mac

If you choose to use the Python2.7 from python.org:

  1. Make sure to use /usr/local/bin/python

  2. 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 Troubleshooting section

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, (unless you are very lucky), so please do use the new Python SDK.