python - 配置 Snappy 时出错。失败,返回码 10
问题描述
为了配置 snappy,我运行了下一个命令
~/snap/bin$ ./snappy-conf /usr/bin/python3.8
结果,我收到以下错误消息:
Configuring SNAP-Python interface...
java.io.IOException: Python configuration failed.
Command [/usr/bin/python3.8 ./snappyutil.py --snap_home /home/sergio/snap --java_module /home/sergio/snap/snap/modules/org-esa-snap-snap-python.jar --force --log_file ./snappyutil.log --jvm_max_mem 10G --java_home /home/sergio/snap/jre/jre --req_arch amd64]
failed with return code 10.
Please check the log file '/home/sergio/.snap/snap-python/snappy/snappyutil.log'.
at org.esa.snap.python.PyBridge.configureJpy(PyBridge.java:232)
at org.esa.snap.python.PyBridge.installPythonModule(PyBridge.java:149)
at org.esa.snap.rcp.cli.SnapArgsProcessor.processPython(SnapArgsProcessor.java:103)
at org.esa.snap.rcp.cli.SnapArgsProcessor.process(SnapArgsProcessor.java:49)
at org.netbeans.modules.sendopts.DefaultProcessor.process(DefaultProcessor.java:202)
at org.netbeans.spi.sendopts.Option$1.process(Option.java:387)
at org.netbeans.api.sendopts.CommandLine.process(CommandLine.java:317)
at org.netbeans.modules.sendopts.HandlerImpl.execute(HandlerImpl.java:62)
at org.netbeans.modules.sendopts.Handler.cli(Handler.java:69)
at org.netbeans.CLIHandler.notifyHandlers(CLIHandler.java:234)
at org.netbeans.core.startup.CLICoreBridge.cli(CLICoreBridge.java:82)
at org.netbeans.CLIHandler.notifyHandlers(CLIHandler.java:234)
at org.netbeans.CLIHandler$1.exec(CLIHandler.java:268)
at org.netbeans.CLIHandler.finishInitialization(CLIHandler.java:447)
at org.netbeans.MainImpl.finishInitialization(MainImpl.java:256)
at org.netbeans.Main.finishInitialization(Main.java:92)
at org.netbeans.core.startup.Main.start(Main.java:316)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
at java.lang.Thread.run(Thread.java:748)
Python configuration error: Python configuration failed.
Command [/usr/bin/python3.8 ./snappyutil.py --snap_home /home/sergio/snap --java_module /home/sergio/snap/snap/modules/org-esa-snap-snap-python.jar --force --log_file ./snappyutil.log --jvm_max_mem 10G --java_home /home/sergio/snap/jre/jre --req_arch amd64]
failed with return code 10.
Please check the log file '/home/sergio/.snap/snap-python/snappy/snappyutil.log'.
'/home/sergio/.snap/snap-python/snappy/snappyutil.log' 文件显示以下信息:
INFO: Installing from Java module '/home/sergio/snap/snap/modules/org-esa-snap-snap-python.jar'
WARNING: Architecture requirement possibly not met: Python is x86_64 but JVM requires amd64
INFO: Installing jpy...
ERROR: The module 'jpy' is required to run snappy, but no binary 'jpy' wheel matching the pattern
'jpy-{version}-cp38-{abi_tag}-linux_x86_64.whl' could be found.
You can try to build a 'jpy' wheel yourself, then copy it into
"/home/sergio/.snap/snap-python/snappy", and then run the configuration again.
Unzip the jpy sources in /home/sergio/.snap/snap-python/snappy/jpy-<version>.zip, then
$ cd jpy-<version>
$ python setup.py bdist_wheel
$ cp dist/*.whl "/home/sergio/.snap/snap-python/snappy"
Or get the source code from https://github.com/bcdev/jpy and follow the build instructions:
$ git clone https://github.com/bcdev/jpy.git
$ cd jpy
ERROR: Configuration failed with exit code 10
我在“~/.snap/snap-python/snappy”目录中下载了“jpy”,但我仍然有同样的错误。在查看有关架构要求的警告信息后,我发现这应该不是问题。
我正在使用 Ubuntu 20.04。有谁知道可能出了什么问题?
非常感谢你们的时间
解决方案
我解决了,python版本和snappy有问题。我必须使用 3.6 python 版本创建一个 conda 环境,然后在我的笔记本上使用该版本。
推荐阅读
- roslyn - Roslyn CodeFix - MSBuild 属性/元数据和单元测试
- typescript - Fat arrow functions in classes using old values after shallow clone (spread syntax)
- android - ArgumentError (Invalid argument(s): Invalid internet address newsapi.org)
- ios - UITextContentTypeOneTimeCode show alphabet as keyboard suggestion ios
- c++ - 为什么这个常量初始化变量的 `std::is_constant_evaluate()` 为假?
- typescript - 来自 lambda 定义的通用方法实现
- c++ - 我的程序中的内存泄漏在哪里,我将如何解决?
- mysql - Liquibase 为几何类型生成迁移(使用 JPA/Hibernate 的 Spring Boot)
- c++ - 为什么 C++ 程序输出这个值?
- c++ - 如何在 1 个 gRPC 流中创建多个 TCP 连接