Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行Demo时,提示“Error: Unable to access jarfile C:\Program Files\python38\lib\site-packages\knext\lib\builder-runner-local-0.0.1-SNAPSHOT-jar-with-dependencies.jar” #85

Closed
w00125533 opened this issue Jan 15, 2024 · 3 comments

Comments

@w00125533
Copy link

Step1:按示例创建Demo工程(https://spg.openkg.cn/tutorial/knext/command)

Step2:运行“1.5 知识加工”章节时出错:knext builder execute Company

提示出错:“Error: Unable to access jarfile C:\Program Files\python38\lib\site-packages\knext\lib\builder-runner-local-0.0.1-SNAPSHOT-jar-with-dependencies.jar”

@baifuyu
Copy link
Contributor

baifuyu commented Jan 16, 2024

Step1:按示例创建Demo工程(https://spg.openkg.cn/tutorial/knext/command)

Step2:运行“1.5 知识加工”章节时出错:knext builder execute Company

提示出错:“Error: Unable to access jarfile C:\Program Files\python38\lib\site-packages\knext\lib\builder-runner-local-0.0.1-SNAPSHOT-jar-with-dependencies.jar”

hi,客户端的安装需要使用docker安装方式,可以参考下这里,https://spg.openkg.cn/tutorial/installation/installation。

@w00125533
Copy link
Author

w00125533 commented Jan 16, 2024

客户端的方式确实可以运行,解决了能运行的问题。但在第一个版本中,knext可以直接在windows上运行,能用IDE单步调试,相当方便。
我尝试在windows下安装后,通过两个调整尝试在windows上运行:
1)修改__init__.py的localhost变量:
LOCAL_SCHEMA_URL = "http://X.X.X.X:8887"
LOCAL_GRAPH_STORE_URL = "tugraph://X.X.X.X:9090?graphName=default&timeout=50000&accessId=admin&accessKey=73@TuGraph"
LOCAL_SEARCH_ENGINE_URL = "elasticsearch://X.X.X.X:9200?scheme=http"

2)在site-packages\knext\lib增加两个Jar包:
builder-runner-local-0.0.1-SNAPSHOT-jar-with-dependencies.jar
reasoner-local-runner-0.0.1-SNAPSHOT-jar-with-dependencies.jar

大部分命令可以运行,但运行部分推理任务时(比如风控的 knext builder execute App)时,出现了需要安装pemja的提示。
image

尝试按提示安装VS14.0后,再安装依然有错(如下图);进一步官网了解pemja只支持windows和MacOS的whl:

image

期待knext 支持在windows运行~!

@baifuyu
Copy link
Contributor

baifuyu commented Jan 30, 2024

客户端的方式确实可以运行,解决了能运行的问题。但在第一个版本中,knext可以直接在windows上运行,能用IDE单步调试,相当方便。 我尝试在windows下安装后,通过两个调整尝试在windows上运行: 1)修改__init__.py的localhost变量: LOCAL_SCHEMA_URL = "http://X.X.X.X:8887" LOCAL_GRAPH_STORE_URL = "tugraph://X.X.X.X:9090?graphName=default&timeout=50000&accessId=admin&accessKey=73@TuGraph" LOCAL_SEARCH_ENGINE_URL = "elasticsearch://X.X.X.X:9200?scheme=http"

2)在site-packages\knext\lib增加两个Jar包: builder-runner-local-0.0.1-SNAPSHOT-jar-with-dependencies.jar reasoner-local-runner-0.0.1-SNAPSHOT-jar-with-dependencies.jar

大部分命令可以运行,但运行部分推理任务时(比如风控的 knext builder execute App)时,出现了需要安装pemja的提示。 image

尝试按提示安装VS14.0后,再安装依然有错(如下图);进一步官网了解pemja只支持windows和MacOS的whl:

image

期待knext 支持在windows运行~!

是的,目前将几个 jar 包以及相关环境打包到docker的原因有以下几点:

  1. pemja包不支持在window下安装,导致java无法调用python代码
  2. pypi无法上传超过100M的包,builder&reasoner的包将近了200M导致上传pypi时失败

目前都将pemja和jar包都打包进docker了支持在docker中运行,后续我们再调研下上述方案如何替代

@baifuyu baifuyu closed this as completed Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants