我一直在尝试设置我的工作环境,因此我可以尝试Beeware教程。
https://voc.readthedocs.io/en/latest/background/install.html
我正在Windows 8和Python 3.7中使用Bash Shell遵循此安装教程的步骤。我安装了所有相关软件并配置了环境变量等。

当我尝试在激活的venv中创建JAR支持文件时,会遇到我遇到的问题:

$ . env/Scripts/activate
(env) $ cd voc
(env) $ pip install -e .
(env) $ ant java ``` -- at this line of code the shell appears to be endlessly stuck in operation as follows:


(env) $ ant java
Buildfile: C:\Users\XXXX\tutorial\voc\build.xml

java:

compile:

compile_stdlib:
     [exec] Cloning into 'ouroboros'...
     [exec] Updating files:  17% (340/1941)


我已经将其运行了一个多小时,并且没有任何进展的迹象。
我非常确定通过venv运行脚本会导致问题,因为当我不使用任何venv时,该过程会在一分钟内成功运行。**

当我输入cd命令时,进程似乎也不会随时间变化。
我也尝试过禁用Windows Defender来提高CPU性能,但是没有运气。

有什么建议可以帮助我在Venv上正常工作?

提前致谢

最佳答案

您可能想尝试其他环境,例如在码头集装箱上。

这是截至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,请参见How to install python3.7 and create a virtualenv with pip on Ubuntu 18.04?

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

关于python - 设置Beeware:我无法在激活的venv中创建我的JAR支持文件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/58966328/

10-12 22:12