
Alternatively, click and specify a path to the Python executable in your file system, for example, C:\Python36\python.exe. Select the Make available to all projects checkbox if you want to reuse this environment when creating Python interpreters in P圜harm.Įxpand the Interpreter list and select any of the existing interpreters. This checkbox corresponds to the -system-site-packages option of the virtualenv tool. Select the Inherit global site-packages checkbox if you want that all packages installed in the global Python on your machine to be added to the virtual environment you're going to create.
#How to setup python on mac download
If P圜harm detects no Python on your machine, it provides two options: to download the latest Python versions from or to specify a path to the Python executable (in case of non-standard installation). Note that the directory where the new virtual environment should be located, must be empty!Ĭhoose the base interpreter from the list, or click and find a Python executable in the your file system. Specify the location of the new virtual environment in the text field, or click and find location in your file system. The following actions depend on whether the virtual environment existed before. In the left-hand pane of the Add Python Interpreter dialog, select Virtualenv Environment. Note that SSH, WSL, Vagrant, Docker, and Docker Compose are available only for the commercial version of P圜harm. Then click the icon and select Add.Ĭhoose the interpreter type to add and perform the specific settings: Press Ctrl+Alt+S to open the project Settings/Preferences and go to Project | Python Interpreter. To add a new interpreter to the current project:Ĭlick the Python Interpreter selector and choose Add Interpreter. It is not recommended selecting the SSH option as it doesn't allow file synchronization and is part of the legacy implementation. When you modify an SSH interpreter, P圜harm shows the parameters of the corresponding Deployment configuration. Click OK to apply the changes.įor remote interpreters (that are available in P圜harm Professional) you can modify configuration parameters. The Python interpreter name specified in the Name field, becomes visible in the list of available interpreters. You can specify an alternative interpreter name for the selected interpreter. Select the target interpreter and click Edit. Synchronize files and then enable auto-uploading You can click one of the links to perform the following actions: Mind a notification balloon in the lower-right corner. When you change an SSH interpreter, you might need to synchronize local content with the target server. When P圜harm stops supporting any of the outdated Python versions, the corresponding Python interpreter is marked as unsupported. Alternatively, click the icon and select Show All. Press Ctrl+Alt+S to open the IDE settings and select Project | Python Interpreter.Įxpand the list of the available interpreters and click the Show All link. Just click it and select the target interpreter:Ĭhange the Python interpreter in the project settings It is the most convenient and quickest way to switch the Python interpreter. The Python Interpreter selector is located on the status bar. Change the Python interpreter using the Python Interpreter selector Setting an existing Python interpreterĪt any time, you can switch your Python interpreter either using the Python Interpreter selector or in the project Settings/Preferences. Python interpreters can be configured for a new project or for the current project (you can create a new interpreter or use one of the existing interpreters). For example, you can create one virtual environment based on Python 3.6 to develop Django applications and another virtual environment based on the same Python 3.6 to work with scientific libraries. This is helpful when you need to create different virtual environments for developing different types of applications. You can create several Python interpreters based on the same Python executable. So, before configuring a Python interpreter, you need to ensure that you've downloaded Python and installed it in your system and you're aware of a path to it. When you configure a Python interpreter, you need to specify the path to the Python executable in your system.
#How to setup python on mac code
With P圜harm Professional, you can also configure interpreters to execute your Python code on remote environments: SSH, Vagrant, WSL (only for Windows), Docker, and Docker Compose A virtual environment consists of a base interpreter and installed packages. You can also create a Virtualenv, Pipenv, Poetry, or Conda virtual environment. You can use a system interpreter that is available with your Python installation. To work with your Python code in P圜harm, you need to configure at least one Python interpreter. Configure a Python interpreter Python interpreters in P圜harm
