-
Notifications
You must be signed in to change notification settings - Fork 1
Setup PyCharm
Author: ancient-sentinel - Last Updated: 11/17/2020
This tutorial assumes you've already installed the NAO Python SDK.
<Instructions Pending>
This tutorial assumes you've already installed the NAO Python SDK.
-
In the
New Project
setup dialog window, expand thePython Interpreter
section and select theExisting interpreter
option. Click the three dots to the right of theInterpreter
selection dropdown to open theAdd Python Interpreter
dialog. -
In the
Add Python Interpreter
dialog window, click the three dots to the right of theInterpreter
selection dropdown at the top to open theSelect Python Interpreter
dialog window. -
In the path entry field enter:
/usr/local/bin/python
and clickOK
. -
Finish setting up your project's settings.
-
Once the project opens, select
PyCharm > Preferences
from the title bar menu at the top of the screen. -
In the
Preferences
dialog window, expand theProject: <your-project-name>
section, then selectPython Interpreter
. -
Click the settings/gear icon to the right of the interpreter name and then select
Show All...
from the drop down menu to open thePython Interpreters
dialog window. -
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 theInterpreter Paths
dialog window. -
Click the
+
button and add<path-to-NAO-sdk>/lib/python2.7/site-packages
, then clickOK
on each dialog until you get back to the project. -
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 toSecurity & Privacy
. -
Click on the
Privacy
tab and scroll down to theDeveloper Tools
. You must sign in with administrator credentials in order to change these settings. -
Once signed in, click the
+
icon and navigate to yourApplications
directory. Once there, selectPyCharm
. 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.
This tutorial assumes you've already installed the NAO Python SDK.
<Instructions Needed>