使用命令conda install -c conda-forge rpy2
安裝python模塊時出現報錯:
UnavailableInvalidChannel: The channel is not accessible or is invalid.
channel name: None
channel url: http://cran.fhcrc.org
error code: 404
可以看出conda默認用http://cran.fhcrc.org
鏈接安裝rpy2,但顯然我想讓conda用conda-forge
安裝rpy2。
解決方法很簡單,直接在.condarc
文件中注釋掉http://cran.fhcrc.org
鏈接就行了。
如下所示: