Skip to content

cristianrubioa/pynaoqi-installation-for-mac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

Python Naoqi Installation Guide For Mac

Python 2.7+

Installing the SDK

  1. You can download the SDK from SoftBank Robotics for the latest version of the SDK OR from the following repository for robots older than NAO Power V6:
git clone https://github.com/cristianrubioa/pynaoqi-installation-for-mac
  1. Extract Python SDK:

Note: In case of downloading from the repository, go to the third step.

tar -xzvf pynaoqi-python-2.7-naoqi-x.x-mac64.tar.gz
mv pynaoqi-python-2.7-naoqi-x.x-mac64 pynaoqi	
  1. Add environment variables:
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
  1. Run the following command on your terminal:
open ~/.bash_profile 
  1. To make it use globally, copy the commands from Step-3 and paste it in .bash_profile, for example:
export PYTHONPATH=${PHTHONPATH}:/Users/admin/Documents/pynaoqi/lib/python2.7/site-packages
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/Users/admin/Documents/pynaoqi/lib
export QI_SDK_PREFIX=/Users/admin/Documents/pynaoqi
  1. Save the file and close the editor .bash_profile.

  2. Force the execution of the .bash_profile file to see the changes immediately without having to restart:

source ~/.bash_profile 

Checking the Installation

Open the terminal and try to run:

python
>>> import naoqi
>>>

Note: If you do not get any error message, you are now ready to use the Python SDK.

Examples

Try these scripts to start: https://github.com/cristianrubioa/nao_robot