# 配置参考(一步一步):https://www.cnblogs.com/cool2005/p/10549725.html
# 本地文件同步到服务器:项目或文件上右键-》deployment-》选择服务器-》点击
https://blog.csdn.net/zhangyu4863/article/details/80188207
报错1:Pycharm:Can't get remote credentials for deployment server
原因:可能是误操作把项目对应的环境配置删除了,需要把不需要的配置(如重复的)删除掉,然后再重新配置
https://blog.csdn.net/m0_37586991/article/details/88381652
错误2:_tkinter.TclError: no display name and no $DISPLAY environment variable 本地不能绘图、不能使用plt.show显示图像
解决:在pycharm settings和run中都设置好DISPLAY环境变量。参考:https://blog.csdn.net/Yarn_/article/details/86506591
设置了还不行?
报错:
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
(gt_flow:23069): Gtk-WARNING **: cannot open display: :1
解决:别用localhost了,也别设置15.0 16.0了,都不管用,直接在本地机器上用ipconfig查到你的IP地址之后(比如为xx.xxx.xxx.xx)。然后在服务器端设置DISPLAY环境变量:
$ export DISPLAY=xx.xxx.xxx.xx:0.0 # xx为你的本机地址
然后在本地机器上的pycharm settings->build, excution, deployment->Console->python console->Environment variables里面增加一条: DISPLAY=xx.xxx.xxx.xx:0.0
在run->edit configurations->Environment variables中也添加这么一条。然后重新运行你的程序,就可以了。
$ python3 pipline_test.py
参考:https://blog.csdn.net/preamble_1/article/details/70883978
# 查看python安装路径
# 方法一:
$ whereis python
# 输出:
python: /usr/bin/python3.5 /usr/bin/python2.7-config /usr/bin/python3.5m-config /usr/bin/python2.7 /usr/bin/python3.5-config /usr/bin/python /usr/bin/python3.5m /usr/lib/python3.5 /usr/lib/python2.7 /etc/python3.5 /etc/python2.7 /etc/python /usr/local/lib/python3.5 /usr/local/lib/python2.7 /usr/include/python3.5 /usr/include/python2.7 /usr/include/python3.5m /usr/share/python /usr/share/man/man1/python.1.gz
# 方法二:在python环境下运行:
$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> path = sys.executable
>>> print(path)
# 输出
/usr/bin/python
# PyCharm Development 按钮灰色?
此时应该可以看到 tools -> development -> options 里提示自动上传无法工作,因为服务器端 path mapping设置不对。
再次检查 tools -> development configuration -> path mapping 设置是否正确,或者重新设置
其他问题:https://junchu.blog.csdn.net/article/details/104365943