您可能想尝试使用不同的环境,例如在 docker 容器上。
这是截至 2019 年 11 月 29 日尝试使用 Ubuntu 18.04 LTS 的报告。我关注了 https://voc.readthedocs.io/en/latest/background/install.html
使用 Python 3.7 而不是默认的 3.6。
python --version
Python 3.7.5
Java 1.8
javac -version
javac 1.8.0_25
由 Ubuntu 包管理器安装的 ant:
ant -version
Apache Ant(TM) version 1.10.5 compiled on March 28 2019
我必须安装 python 3.7 venv 请参阅如何在 Ubuntu 18.04 上安装 python3.7 并使用 pip 创建一个 virtualenv?
sudo apt-get install python3.7-venv
克隆存储库
git clone https://github.com/beeware/voc.git
激活虚拟环境
python3 -m venv env
$ . env/bin/activate
$ cd voc
$ pip install -e .
现在终于运行给你带来麻烦的 ant 命令:
ant java
Buildfile: /hd/sengo/home/wf/source/python/beeware/voc/build.xml
java:
compile:
[mkdir] Created dir: /hd/sengo/home/wf/source/python/beeware/voc/build/java
[javac] Compiling 140 source files to /hd/sengo/home/wf/source/python/beeware/voc/build/java
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
compile_stdlib:
[exec] Cloning into 'ouroboros'...
[exec] Cloning Ouroboros...
[exec] Compiling 95 python modules...
[exec] ...............................................................................................
[exec] Built 95 modules
dist:
[mkdir] Created dir: /hd/sengo/home/wf/source/python/beeware/voc/dist
[jar] Building jar: /hd/sengo/home/wf/source/python/beeware/voc/dist/Python-3.7-Java-support.b7.jar
[copy] Copying 1 file to /hd/sengo/home/wf/source/python/beeware/voc/dist
compile:
compile-testdaemon:
[mkdir] Created dir: /hd/sengo/home/wf/source/python/beeware/voc/build/java-testdaemon
[javac] Compiling 2 source files to /hd/sengo/home/wf/source/python/beeware/voc/build/java-testdaemon
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] 1 warning
dist-testdaemon:
[jar] Building jar: /hd/sengo/home/wf/source/python/beeware/voc/dist/Python-3.7-Java-testdaemon.b7.jar
[copy] Copying 1 file to /hd/sengo/home/wf/source/python/beeware/voc/dist
BUILD SUCCESSFUL
Total time: 56 seconds