无法安装python-weka-wrapper

问题描述 投票:0回答:1

我正在安装软件包python-weka-wrapper。但是我对Java开发工具包有疑问。

这是针对Windows 10上的python 3.7.4的。

C:\Users\dell>pip install python-weka-wrapper3
Collecting python-weka-wrapper3
  Using cached https://files.pythonhosted.org/packages/48/3a/0f345b19774b5b6c53e9456c2985d79ff09b610bbf29d95403004734a45b/python-weka-wrapper3-0.1.7.tar.gz
Collecting javabridge>=1.0.14
  Using cached https://files.pythonhosted.org/packages/a6/a0/c59bccabed99b1d4ac68166c59c679b375bfca75b78688b52c541b711578/javabridge-1.0.18.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\dell\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-4r0otofz\\javabridge\\setup.py'"'"'; __file__='"'"'C:\\Users\\dell\\AppData\\Local\\Temp\\pip-install-4r0otofz\\javabridge\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\pip-egg-info'
         cwd: C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\setup.py", line 402, in <module>
        ext_modules=ext_modules(),
      File "C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\setup.py", line 96, in ext_modules
        jdk_home = find_jdk()
      File "C:\Users\dell\AppData\Local\Temp\pip-install-4r0otofz\javabridge\javabridge\locate.py", line 203, in find_jdk
        "Failed to find the Java Development Kit. "
    RuntimeError: Failed to find the Java Development Kit. Please download and install the Oracle JDK 1.6 or later
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

应该已经检查过Java版本:

C:\Users\dell>java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

那么如何解决错误?谢谢!

python weka
1个回答
0
投票

您已经检查并找到Java运行时环境(JRE),而不是Java开发工具包,它是单独的安装。

您可以在oracle website上找到它。下载并安装,然后应该解决您的问题

© www.soinside.com 2019 - 2024. All rights reserved.