NameError:没有定义全局名称“RPyPException”

时间:2023-02-13 20:27:23

2ND question: Thanks so much Ben! It works! I got at Error 13 message saying I couldn't make a temporary file in C:\Program Files so I movd the ARSER folder and put it under my user name. That took care of the Error 13 but now I get NameError: a global name 'RPyPException' is not defined. Is this because I moved the folder out of the Program Files folder where I have saved R, Python, and rpy? Thanks!

第二个问题:非常感谢本!它的工作原理!我13错误消息说我不能让一个临时文件在C:\Program Files所以我movd屁股文件夹并把它在我的用户名。这解决了错误13,但是现在我得到NameError:没有定义全局名称“RPyPException”。这是因为我将文件夹从我保存了R、Python和rpy的Program Files文件夹中移出了吗?谢谢!


1ST question: I am trying to analyze biorythm data with a program called ARSER (http://bioinformatics.cau.edu.cn/ARSER/) and when I try to run it I get the error:

第一个问题:我正在用一个名为ARSER的程序(http://bioinformatics.cau.edu.cn/ARSER/)分析生物节律数据,当我试图运行它时,我得到了错误:

File "C:\Program Files\ARSER\arser.py", line 9, in from rpy import * Import Error: no module named rpy

文件“C:\ Program Files \屁股\屁股。第9行,从rpy导入*导入错误:没有名为rpy的模块

I am running WINDOWS 7 and have downloaded:

我正在运行WINDOWS 7,并已下载:

  1. Python(x,y) running Python version 2.7.2.3
  2. Python(x,y)运行Python版本2.7.2.3。
  3. windows patch for Python 2.7 (pywin32-217.win32-py2.7.exe)
  4. Python 2.7的windows补丁(pywin32-217.win32-py2.7.exe)
  5. R version 2.8.1
  6. R 2.8.1发布版本
  7. rpy version 2.2.3
  8. 2.2.3 rpy版本

Under the My Computer Advanced Options I changed the environmental variable PATH to C:\Program Files\R\R-2.8.1\bin but this did not solve the above error. The help instructions I was reading were from an older version of R so maybe that's the problem?

在我的电脑高级选项我改变了环境变量路径C:\Program Files\R\R-2.8.1\bin但这并没有解决上述错误。我正在阅读的帮助说明来自一个旧版本的R所以这可能是问题所在?

I am new to all these programs and I appreciate any suggestions you have! Thanks so much!

我对所有这些节目都很陌生,我很感激你给我的建议!非常感谢!

1 个解决方案

#1


0  

I suspect you need to change the PYTHONPATH environment variable to include the directory containing rpy. Python knows where to search for modules when you import something by using the PYTHONPATH environment variable, much as the shell knows where to look for a program that you type the name of by using the PATH environment variable.

我怀疑您需要更改PYTHONPATH环境变量以包含包含rpy的目录。当您使用PYTHONPATH环境变量导入一些东西时,Python知道在哪里搜索模块,就像shell知道在哪里查找您使用PATH环境变量键入的程序的名称一样。

#1


0  

I suspect you need to change the PYTHONPATH environment variable to include the directory containing rpy. Python knows where to search for modules when you import something by using the PYTHONPATH environment variable, much as the shell knows where to look for a program that you type the name of by using the PATH environment variable.

我怀疑您需要更改PYTHONPATH环境变量以包含包含rpy的目录。当您使用PYTHONPATH环境变量导入一些东西时,Python知道在哪里搜索模块,就像shell知道在哪里查找您使用PATH环境变量键入的程序的名称一样。