I have a project located at /home/myself/workspace/Project1, for which I created an SDK from a Python 2.7.3 Virtualenv I have setup.
This project uses some external code
From Version of 2017.1 adding it has been changed again. There is no project structure in the file menu. Writing current procedure down:
Go To Preference/Settings. File -> Settings (IDE Name -> Preferences for macOS)
Select Build, Execution, Deployment
Select Python Interpreter
Select on drop-down menu of project interpreter and select the path of path of version of Python required for the project.
All error should be gone now and You should be able to see Python used in the project in the list of external libraries.
Happy Coding.