【Pycharm】配置远程运行
环境
本机:Windows-10-10.0.19041-SP0
远程服务器:Linux-5.4.0-53-generic-x86_64-with-glibc2.29
测试代码
import platform
if __name__ == '__main__':
print(platform.platform())
配置
配置Deployment来同步文件(先)
进入配置Deployment
添加一个新的配置,设置ssh来连接
设置本地和远程的文件map
配置Interpreter来远程执行(后)
选择setting
进入setting,选择Project Interpreter,选择Add
选择添加SSH Interpreter,配置SSH configuration
具体配置SSH Configurations
OK后,选择下一步到达添加Python Interpreter
选择Sync folders需要和Deployment中的map文件夹对应