安装PyLucene时makefile出现问题

时间:2019-03-03 19:56:19

标签: makefile lucene pylucene

我正在尝试在Windows 10计算机上构建PyLucene。以下是我目前在Makefile中提供的详细信息:

PREFIX_PYTHON=C:\\Users\\Charlie\\Anaconda3
ANT=C:\\Program Files\\apache-ant-1.10.5\\bin\\ant
JAVA_HOME=C:\\Program Files\\Java\\jdk-11.0.2
PYTHON=$(PREFIX_PYTHON)\python.exe
JCC = $(PYTHON) -m jcc
NUM_FILES = 8

当我从命令行运行“ make”时,遇到以下错误:

process_begin: CreateProcess(NULL, pwd, ...) failed.
process_begin: CreateProcess(NULL, which icupkg, ...) failed.
process_begin: CreateProcess(NULL, uname, ...) failed.
process_begin: CreateProcess(NULL, uname, ...) failed.
cd lucene-java-7.6.0/lucene; (C:\\Program Files\\apache-ant-1.10.5\\bin\\ant ivy-availability-check || C:\\Program Files\\apache-ant-1.10.5\\bin\\ant ivy-bootstrap)
process_begin: CreateProcess(NULL, uname, ...) failed.
The filename, directory name, or volume label syntax is incorrect.
'C:\\Program' is not recognized as an internal or external command,
operable program or batch file.
make: *** [ivy] Error 1

有人可以提供有关发生问题的任何见解吗?谢谢。

2 个答案:

答案 0 :(得分:1)

尝试一下。

JAVA_HOME="C:\\"Program Files"\\Java\\jdk-11.0.2"

答案 1 :(得分:0)

此错误表明语法不正确。

The filename, directory name, or volume label syntax is incorrect.
'C:\\Program' is not recognized as an internal or external command,
operable program or batch file.

在这种情况下,您的ANT和JAVA_HOME路径中有一个空格,例如-C:\ Program Files(注意 Program Files之间的空格)。

当路径之间有空格时,请始终用双引号将它们括起来,例如-

ANT       = "C:\\Program Files\\apache-ant-1.10.5\\bin\\ant"
JAVA_HOME = "C:\\Program Files\\Java\\jdk-11.0.2"