<tfoot id='4NnEL'></tfoot>
  • <i id='4NnEL'><tr id='4NnEL'><dt id='4NnEL'><q id='4NnEL'><span id='4NnEL'><b id='4NnEL'><form id='4NnEL'><ins id='4NnEL'></ins><ul id='4NnEL'></ul><sub id='4NnEL'></sub></form><legend id='4NnEL'></legend><bdo id='4NnEL'><pre id='4NnEL'><center id='4NnEL'></center></pre></bdo></b><th id='4NnEL'></th></span></q></dt></tr></i><div id='4NnEL'><tfoot id='4NnEL'></tfoot><dl id='4NnEL'><fieldset id='4NnEL'></fieldset></dl></div>

        <bdo id='4NnEL'></bdo><ul id='4NnEL'></ul>

      1. <small id='4NnEL'></small><noframes id='4NnEL'>

        <legend id='4NnEL'><style id='4NnEL'><dir id='4NnEL'><q id='4NnEL'></q></dir></style></legend>
      2. NLTK 找不到 Java 可执行文件

        时间:2024-08-24

          <tbody id='lYnxi'></tbody>

      3. <legend id='lYnxi'><style id='lYnxi'><dir id='lYnxi'><q id='lYnxi'></q></dir></style></legend>

        <small id='lYnxi'></small><noframes id='lYnxi'>

              <bdo id='lYnxi'></bdo><ul id='lYnxi'></ul>
              <i id='lYnxi'><tr id='lYnxi'><dt id='lYnxi'><q id='lYnxi'><span id='lYnxi'><b id='lYnxi'><form id='lYnxi'><ins id='lYnxi'></ins><ul id='lYnxi'></ul><sub id='lYnxi'></sub></form><legend id='lYnxi'></legend><bdo id='lYnxi'><pre id='lYnxi'><center id='lYnxi'></center></pre></bdo></b><th id='lYnxi'></th></span></q></dt></tr></i><div id='lYnxi'><tfoot id='lYnxi'></tfoot><dl id='lYnxi'><fieldset id='lYnxi'></fieldset></dl></div>
                  <tfoot id='lYnxi'></tfoot>
                  本文介绍了NLTK 找不到 Java 可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我用的是NLTK的nltk.tag.stanford,需要调用java可执行文件.

                  I am using NLTK's nltk.tag.stanford, which needs to call the java executable.

                  我将 JAVAHOME 设置为安装 jdk 的 C:Program FilesJavajdk1.6.0_25,但运行程序时出现错误

                  I set JAVAHOME to C:Program FilesJavajdk1.6.0_25 where my jdk is installed, but when run the program I get the error

                  "NLTK was unable to find the java executable! Use the config_java() or set the JAVAHOME variable"
                  

                  然后我花了3个小时调试它并尝试了

                  Then I spent 3 hours on debugging it and tried

                  config_java("C:/Program Files/Java/jdk1.6.0_25/")
                  
                  config_java("C:/Program Files/Java/jdk1.6.0_25/bin/")
                  and those without the ending "/". 
                  

                  但是 nltk 仍然找不到它.

                  However the nltk still cannot find it.

                  有人知道出了什么问题吗?非常感谢!

                  Anyone has idea about what's going wrong? Thanks a loooot!

                  推荐答案

                  如果设置 JAVA_HOME 环境对你没有帮助,试试这个:

                  If setting the JAVA_HOME environment doesn't help you, try this:

                  config_java() 对我不起作用.我将以下几行添加到我的代码中并且它起作用了:

                  config_java() did not work for me. I add the following lines to my code and it worked:

                  import os
                  java_path = "C:/Program Files/Java/jdk1.7.0_11/bin/java.exe"
                  os.environ['JAVAHOME'] = java_path
                  

                  我正在运行 Windows 7 64 位

                  I am running Windows 7 64-bit

                  这篇关于NLTK 找不到 Java 可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Set&lt;element&gt; 是什么?意思是? 下一篇:JSF - &lt;h:outputText&gt;使一些单词加粗

                  相关文章

                    <tfoot id='X1vA4'></tfoot>

                      <small id='X1vA4'></small><noframes id='X1vA4'>

                    1. <i id='X1vA4'><tr id='X1vA4'><dt id='X1vA4'><q id='X1vA4'><span id='X1vA4'><b id='X1vA4'><form id='X1vA4'><ins id='X1vA4'></ins><ul id='X1vA4'></ul><sub id='X1vA4'></sub></form><legend id='X1vA4'></legend><bdo id='X1vA4'><pre id='X1vA4'><center id='X1vA4'></center></pre></bdo></b><th id='X1vA4'></th></span></q></dt></tr></i><div id='X1vA4'><tfoot id='X1vA4'></tfoot><dl id='X1vA4'><fieldset id='X1vA4'></fieldset></dl></div>

                      <legend id='X1vA4'><style id='X1vA4'><dir id='X1vA4'><q id='X1vA4'></q></dir></style></legend>
                        <bdo id='X1vA4'></bdo><ul id='X1vA4'></ul>