When you install PyCharm, the default Python interpreter is may not the version you want to use for your new projects. When you create a new project, and the project interpreter is not set, you may get the following error message:
Executed command:
/var/folders/_x/_f0zzs1s4sx6bk4s8n78l2jsbn9r3z/T/tmpBoQLx_pycharm-management/pip-9.0.1/setup.py installError occurred:
40:357: execution error: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: ‘python_requires’Command output:
40:357: execution error: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: ‘python_requires’
warnings.warn(msg)
warning: build_py: byte-compiling is disabled, skipping.
warning: install_lib: byte-compiling is disabled, skipping.
error: byte-compiling is disabled.
(1)
Solution:
Set the default Python interpreter to the latest installed version before you create your project:
- Start PyCharm
- In the File menu select Default Settings…
- On the left side select Project Interpreter,
- On the right side click the arrow of the Project Interpreter drop-down
- Select the Python interpreter you want to use by default, and click the OK button.