Pycharm remote configuration file

Connect to the remote server through pycharm and debug the generation.

Table of contents

1. Set up remote connection

 2. Configure the mapping relationship

3. Remote interpreter settings


1. Set up remote connection

First open the configuration panel

 There are three tabs in turn below: connection (connection), mappings (mapping), excluded paths (excluded targets)

 Connection is the basic connection configuration. We generally choose SFTP as the type. The host name is the ip address you connect to the Linuxf server. The port number is 22 by default. Then you can click the Test SFTP connection button to test whether the connection is smooth. The user name and password used to connect to the Linux server, you can check save password, so that the password can be saved.

 2. Configure the mapping relationship

 The local path requires you to fill in the local project name path, followed by the project name deployed to the server, the two can be consistent or not.

When it is consistent, it means that you only need to remote map the current project, that is, you only plan to run this project remotely, then finally pychram will upload this project to the second path you wrote on the server.

If you need to run multiple projects remotely, you can roll back the local path one level, which will contain many projects. Similarly on a linux server you can create a folder dedicated to storing all projects.

3. Remote interpreter settings

 After clicking, you will see such a panel. These three parameters are very important. The first parameter is the python version you want to run, select the anaconda path installed on the server, and the second Sync folder is the operating environment mapping, indicating this In which folder is the operating environment used.

With the basic operations of the first two steps, there is one more step to specify the running environment for the python file you want to run.

 Click on these two options in turn to open our run configuration panel:

Guess you like

Origin blog.csdn.net/weixin_45912366/article/details/127310026