Rpy2 not finding package

后端 未结 5 1029
时光说笑
时光说笑 2021-02-04 13:43

I\'m using Rpy2 on windows 7 64 and having trouble loading a package:

in R:

using(mi)

in python:

from rpy2.robjects         


        
5条回答
  •  遇见更好的自我
    2021-02-04 14:21

    In python: Check the version of R being used by rpy2

    import rpy2.robjects as robjects
    robjects.r['version']
    
    

    Check your rpy2 library location

    base = importr('base')
    print(base._libPaths())
    

    In R: Check your R library location for this version of r

    .libPaths()
    

    copy the library installed in your version of r to the folder used by rpy2.

提交回复
热议问题