Skip to content

Setup PyCharm

Bryce George edited this page Nov 18, 2020 · 5 revisions

Author: ancient-sentinel - Last Updated: 11/17/2020

Linux

This tutorial assumes you've already installed the NAO Python SDK.

<Instructions Pending>

 

Mac

This tutorial assumes you've already installed the NAO Python SDK.

  1. In the New Project setup dialog window, expand the Python Interpreter section and select the Existing interpreter option. Click the three dots to the right of the Interpreter selection dropdown to open the Add Python Interpreter dialog.

  2. In the Add Python Interpreter dialog window, click the three dots to the right of the Interpreter selection dropdown at the top to open the Select Python Interpreter dialog window.

  3. In the path entry field enter: /usr/local/bin/python and click OK.

  4. Finish setting up your project's settings.

  5. Once the project opens, select PyCharm > Preferences from the title bar menu at the top of the screen.

  6. In the Preferences dialog window, expand the Project: <your-project-name> section, then select Python Interpreter.

  7. Click the settings/gear icon to the right of the interpreter name and then select Show All... from the drop down menu to open the Python Interpreters dialog window.

  8. Click the Show paths for the selected interpreter button at the bottom of the interpreter list (the button looks like a directory tree diagram) to open the Interpreter Paths dialog window.

  9. Click the + button and add <path-to-NAO-sdk>/lib/python2.7/site-packages, then click OK on each dialog until you get back to the project.

  10. In the Python Console try running:

import naoqi

If you don't get any errors, then you're all done.

If a window pops up warning that the safety of one or more of the modules cannot be verified, then you'll need to add PyCharm to your list of Developer Tools in your Security and Privacy settings. To do so:

  • Open up your System Preferences, then go to Security & Privacy.

  • Click on the Privacy tab and scroll down to the Developer Tools. You must sign in with administrator credentials in order to change these settings.

  • Once signed in, click the + icon and navigate to your Applications directory. Once there, select PyCharm. You will be prompted to restart PyCharm after doing so in order for the settings to take effect.

You should now be able to import the naoqi module.

 

Windows

This tutorial assumes you've already installed the NAO Python SDK.

<Instructions Needed>

Clone this wiki locally