Hi all!

I have a problem when i try to use nltk in Spyder. I've installed the nltk 
package in Python so when I use python in the console (see the debug code 3 
below) it works just fine. But When I try to use it in Spyder it doesn't 
work. Ive tried both with default values of python path (in 
Spyder-Preferences-Console-Advanced-Python executable) and with 
/usr/bin/python but it does not work. See the output below. 
Im quite new to Python.

When I start Spyder (in the ordinary way) - 
/Applications/Spyder.app/Contents/MacOS/python 
Python 2.7.3 (default, Jul 24 2012, 20:20:13) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)] on 
darwin
Type "help", "copyright", "credits" or "license" for more information.

Imported NumPy 1.6.2, SciPy 0.11.0, Matplotlib 1.2.0
Type "scientific" for more details.

>>> import nltk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named nltk


When I start Spyder (in the other suggested path) - /usr/bin/python

Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File 
"/Applications/Spyder.app/Contents/Resources/lib/python2.7/spyderlib/scientific_startup.py",
 
line 16, in <module>
    from pylab import *  #analysis:ignore
ImportError: No module named pylab
>>> import nltk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named nltk
>>> 


And if I run python in the terminal - it works!?

Manss-MacBook-Pro-2:~ mansmagnusson$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
>>> 


-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to