运行RGFClassifi时出错

2024-05-16 10:33:40 发布

您现在位置:Python中文网/ 问答频道 /正文

我最近尝试从这个包https://pypi.python.org/pypi/rgf_python运行正则化贪婪森林算法(rgf分类器)。在

我确实运行了pip install rgf_python,但当我尝试运行示例时,spyder中会弹出一个错误:

  File "C:\Users\me\Anaconda3\lib\site-packages\rgf\sklearn.py", line 111, in <module>
    "config flag 'exe_location' to RGF execution file.".format(_EXE_PATH))

Exception: C:\Users\me\rgf.exe is not executable file. Please set config flag 'exe_location' to RGF execution file.

我应该更改什么才能配置标志'exe_location'?可能听起来是初学者,但在任何地方都找不到。在


Tags: tohttpsorgpypiconfiglocationexeusers
1条回答
网友
1楼 · 发布于 2024-05-16 10:33:40

官方文件在这里。 https://github.com/fukatani/rgf_python#installation

为了获得准确的支持,我想知道您的操作系统和python版本。在

简而言之,你应该做以下两件事。在

首先,您应该构建rgf执行文件。在

$git克隆https://github.com/fukatani/rgf_python.git

$cd rgf_python/include/rgf/build

$制造

如果成功,那么如果使用linux,可以找到rgf_python/include/rgf/bin/rgf。在

其次,你应该注册exe的位置。 有几种方法,但我建议使用编辑~/.rgfrc方法。 用文本编辑器打开~/.rgfrc,然后添加行。 exe_location=/path/to/rgf_python/include/rgf/bin/rgf.exe exe_位置应该是完整路径,请不要使用相对路径。在

谢谢。在

相关问题 更多 >