简体   繁体   English

conda 将 R 包构建到不同的库位置

[英]conda build R packages to different library location

I'm following the instructions from https://www.continuum.io/content/conda-data-science in order to build a CRAN-available R package (eg synthpop).我正在按照https://www.continuum.io/content/conda-data-science的说明构建一个 CRAN 可用的 R 包(例如 synthpop)。

conda skeleton cran synthpop
conda build r-synthpop

How can I change the default conda build sequence to install to a different library location, as I don't have permission to install to the default one?如何更改默认 conda 构建序列以安装到不同的库位置,因为我无权安装到默认位置?

* installing to library ‘/path/to/default/lib’
Error: ERROR: no permission to install to directory ‘/path/to/default/lib’

Also, I'm running conda build from within a virtual env.另外,我正在从虚拟环境中运行 conda build。

Raised this as an issue here: https://github.com/ContinuumIO/anaconda-issues/issues/1562在这里提出这个问题: https : //github.com/ContinuumIO/anaconda-issues/issues/1562

Hi I was faced with this similar problem recently.嗨,我最近遇到了类似的问题。 After some researches, I wrote one passage about it经过一番研究,我写了一篇关于它的文章

https://github.com/alfredzj/Documentations/blob/master/anaconda-set-up.md https://github.com/alfredzj/Documentations/blob/master/anaconda-set-up.md

I don't think changing location is a good idea.我不认为改变位置是一个好主意。

The --croot option allows installs to a specific location: --croot 选项允许安装到特定位置:

conda build --croot /path/to/somewhere/env r-synthpop/ 

In our case we had two R installs, and the configuration in .Rprofile listed a library location which had restricted write permissions.在我们的例子中,我们有两个 R 安装,并且 .Rprofile 中的配置列出了一个限制写入权限的库位置。 This location masked the path we gave via --croot.这个位置掩盖了我们通过 --croot 给出的路径。 Once we edited .Rprofile we could run conda build with the desired path.一旦我们编辑了 .Rprofile,我们就可以使用所需的路径运行 conda build。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM