Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing the Python NLTK (2.0b5) on the Google App Engine
    text
    copied!<p>I have been trying to make the NLTK (Natural Language Toolkit) work on the Google App Engine. The steps I followed are:</p> <ol> <li>Download the installer and run it (a .dmg file, as I am using a Mac).</li> <li>copy the nltk folder out of the python site-packages directory and place it as a sub-folder in my project folder.</li> <li>Create a python module in the folder that contains the nltk sub-folder and add the line: <code>from nltk.tokenize import *</code> </li> </ol> <p>Unfortunately, after launching it I get this error (note that this error is raised deep within NLTK and I'm seeing it for my system installation of python as opposed to the one that is in the sub-folder of the GAE project):</p> <pre><code> &lt;type 'exceptions.ImportError'&gt;: No module named nltk Traceback (most recent call last): File "/base/data/home/apps/xxxx/1.335654715894946084/main.py", line 13, in &lt;module&gt; from lingua import reducer File "/base/data/home/apps/xxxx/1.335654715894946084/lingua/reducer.py", line 11, in &lt;module&gt; from nltk.tokenizer import * File "/base/data/home/apps/xxxx/1.335654715894946084/lingua/nltk/__init__.py", line 73, in &lt;module&gt; from internals import config_java File "/base/data/home/apps/xxxx/1.335654715894946084/lingua/nltk/internals.py", line 19, in &lt;module&gt; from nltk import __file__ </code></pre> <p>Note: this is how the error looks in the logs when uploaded to GAE. If I run it locally I get the same error (except it seems to originate inside my site-packages instance of NLTK ... so no difference there). And "xxxx" signifies the project name.</p> <p>So in summary:</p> <ul> <li>Is what I am trying to do even possible? Will NLTK even run on the App Engine?</li> <li>Is there something I missed? That is: copying "nltk" to the GAE project isn't enough?</li> </ul> <p><strong>EDIT: fixed typo and removed unnecessary step</strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload