1.打开pyCharm
Tools->Deployment->Configuratio
Connecion ->Root Path: /home/admin/application/core-python/yanzhengma(填写根目录path)
Mappings->Deployment path on server:/test (填写服务器目录下的文件,该文件在path目录下)
2.打开File->Setting
设置 Project Interpreter:
运行环境为服务器的python的安装路径
设置Path mappings:
点击...标识的按钮
设置Local Path 和Remote Path对应的关系:
Local Path 为当前机器对应的目录
Remote Path 为服务器对应的目录