huawei-noah / trustworthyAI

Trustworthy AI related projects
Apache License 2.0
945 stars 211 forks source link

安装问题 #150

Open liaojiaxin97 opened 4 months ago

liaojiaxin97 commented 4 months ago

请问这篇文章的代码Causal Discovery with Reinforcement Learning,是windows适用还是ubantu 为什么我按照readme操作后,会有如下问题 image image 运行main.py有如下结果 image

shaido987 commented 4 months ago

Hello,

did you successfully install the rpy2 package? You can also see if the suggestions here helps you: https://github.com/huawei-noah/trustworthyAI/issues/34

liaojiaxin97 commented 4 months ago

Thank you for your reply. Now my version of rpy2 is 2.9.4. When I install version 3.1.0, the following error is displayed. I don't think it's the problem of the pip version. image

As for #34 you mentioned, I have tried to install it as follows in RSstudio, but I am not sure if it is a successful installation. When I run the following code, return'Packages not installed correctly.' image RSstudio install image

Version:windows10,python3.6.13

liaojiaxin97 commented 4 months ago

Now,I run this code and return the following error image

This is the environment variable that I set in PATH image

shaido987 commented 4 months ago

Removing the 'R.dll' at the end of the path should solve the runtime error. So "C:\Program Files\R\R-4.3.3\bin\x64".

This guide could be helpful to make sure everything is installed correctly: https://joonro.github.io/blog/posts/install-rpy2-windows-10/

liaojiaxin97 commented 4 months ago

Following the link you gave me, I am having problems installing r 3.8.1 image I also searched for versions of rpy2 and there was no 3.1.0 image

Please help me. I've been struggling with this all day

shaido987 commented 4 months ago

For r-base maybe this helps: https://anaconda.org/conda-forge/r-base Otherwise you can install R following this: https://github.com/huawei-noah/trustworthyAI/issues/34#issuecomment-1101959917

For rpy2 with conda, 2.9.4 is the latest version for Windows. You could try pip instead to see if you can get 3.1.0, otherwise you can see if 2.9.4 works.

liaojiaxin97 commented 4 months ago

Thank you very much for your answer, none of the above work, mainly stuck in the CAM package download and RStudio configuration conda R language environment, very sad