Configuring Python Path
Requirements
This guide assumes you obtained a copy of this project by cloning it from our repository.
Actions
Let your python interpreter know where to look in order to find the psic module.
The psic module is located under src/python in the project, so we'll need to export the src/python folder as
PYTHONPATH.
Linux
-
Add the line
export PYTHONPATH="<path to project>/src/python"to the end of the file~/.bashrcusing your favorite text editor (e.g.nano ~/.bashrcfor the nano text editor). This will ensure that your python interpreter knows where to look. -
Log-out and log back in to trigger the
~/.bashrcfile.
Windows 10
- Click
Startin the bottom-left - Search
environment variables - Click
Edit the system environment variablesin the search results - Click the
Environment Variables...button in the bottom right-hand corner of the window that pops up - Click
New...and add the variable as either a user or system variable. Variable name will bePYTHONPATHand value will be<path to project>/src/python
Module not found: 'psic'
If you get an error that says something like Module 'psic' not found!, then the python interpreter can't
find the project. Double-check that the project is in the PYTHONPATH. You should see it in your environment
variables when running env from terminal in Linux or in the environmental variables screen in Windows 10.