我在windows10上使用python版本3.10.1,并试图安装python的模块minerl,但它返回错误:
`> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_361 contains a valid JDK installation.`
我有Java 8 Update 361(x64)和Java SE Developpement Kit 8 Update 361。
命令python.exe -m pip install minerl的日志结尾是:
`
BUILD FAILED in 5m 48s
20 actionable tasks: 20 executed
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Trinometra\AppData\Local\Temp\pip-install-61k4nuvk\minerl_e8c585976cc144989e513c08059a2d1d\setup.py", line 167, in <module>
setuptools.setup(
File "C:\Users\Trinometra\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Trinometra\AppData\Local\Programs\Python\Python310\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Trinometra\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Trinometra\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Trinometra\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\Trinometra\AppData\Local\Programs\Python\Python310\lib\distutils\command\install.py", line 580, in run
self.run_command(cmd_name)
File "C:\Users\Trinometra\AppData\Local\Programs\Python\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Trinometra\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Trinometra\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "C:\Users\Trinometra\AppData\Local\Temp\pip-install-61k4nuvk\minerl_e8c585976cc144989e513c08059a2d1d\setup.py", line 88, in build
build_minecraft(MALMO_DIR, os.path.join(
File "C:\Users\Trinometra\AppData\Local\Temp\pip-install-61k4nuvk\minerl_e8c585976cc144989e513c08059a2d1d\setup.py", line 141, in build_minecraft
subprocess.check_call('{} -g run/gradle shadowJar'.format(gradlew).split(' '))
File "C:\Users\Trinometra\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gradlew.bat', '-g', 'run/gradle', 'shadowJar']' returned non-zero exit status 1.
building Minecraft from C:\Users\Trinometra\AppData\Local\Temp\pip-install-61k4nuvk\minerl_e8c585976cc144989e513c08059a2d1d\minerl\Malmo, build dir: build\lib\minerl\Malmo
copying source dir
CALLING SETUP.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> minerl`
我尝试安装模块minerl开始开发minecraft智能机器人,但它不工作。我第一次尝试重新安装JDK和Java,但它没有改变任何东西。
1条答案
按热度按时间jdg4fx2g1#
%JAVA_HOME%没有设置为我的java jdk路径,问题解决了