Associative Embedding: End-to-end Learning for Joint Detection and Grouping

某古老代碼 其中源碼編譯cuda函數,需要Pytorch 1.0以下版本(實測0.4可以,0.4.1就不行gcc報錯)和Python 3.6。

首先源碼編譯安裝Python 3.6

  • 解壓源碼後,到其目錄下
./configure
make && make install

結果無法使用pip,顯示ssl模塊未安裝。按照網上方法./configure --with-ssl完全不會有效。

  • 應該先安裝ssl相關庫和TK庫:

 

sudo apt-get install openssl
sudo apt-get libssl-dev
sudo apt-get install tcl-dev tk-dev python3-tk
  •  改下Moudles/Setup
#修改結果如下:
# Socket module helper for socket(2)
_socket socketmodule.c timemodule.c

# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
#SSL=/usr/local/ssl
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
  • 重新走一波節奏
sudo ./configure
sudo make && make install
  • python3.6
>>>import ssl  #檢測成功!
>>>

安裝Pytorch0.4.0(0.4.1也不太行)

cuda_10.0的話可以,10.1就不行

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章