需要在服務器上調試程序。
參考使用PyCharm進行遠程開發和調試,
結果在增加遠程 python 環境的時候,配置的 ssh deplotment一直報錯。
project level deployment servers are not currently supported. please create one of two links above.
暫時還沒有解決,先用 ssh 連接着。
添加遠程環境之後, 可以正常運行,但是調試的時候會報錯。
import torch
File"/data1/public/research_venv/anaconda3/lib/python3.6/site-packages/torch/__init__.py", line 53, in <module>
from torch._C import *
ImportError: dlopen: cannot load any more object with static TLS
相關 github issue 爲Debian 8.9 (Jessie) + Anaconda Python fail to load pytorch binaries #2575.
- 嘗試將
import torch
移到首行,失敗 - 嘗試失敗
If it happens only in debug in Pycharm, you can solve this by adding 'import torch' in the beginning of <Pycharm_dir>/helpers/pydev/pydevd.py
-
+