Feb-22-2018, 03:11 PM
Hi All,
I am a python noob (comparable to when this thread was first started) trying to get NLTK up and running as my first Python application.
I have both python 2.7.10 and 3.6.4 installed. I think I somehow installed NLTK into the wrong version of Python and I have been unable to get the NLTK module in python3. I have installed a bunch of packages in Python3 (matplotlib, math, numpy) and want to make sure I am ONLY coding in Python3 going forward.
Any help getting my foundation right would be really helpful! I'm in circles now with the python version -- module install alignment.
From Terminal:
--- python --- module is found
Kevins-MBP:~ kevin$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
>>>
--- python3 --- module not found
Kevins-MBP:~ kevin$ python3
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'nltk'
>>>
I am a python noob (comparable to when this thread was first started) trying to get NLTK up and running as my first Python application.
I have both python 2.7.10 and 3.6.4 installed. I think I somehow installed NLTK into the wrong version of Python and I have been unable to get the NLTK module in python3. I have installed a bunch of packages in Python3 (matplotlib, math, numpy) and want to make sure I am ONLY coding in Python3 going forward.
Any help getting my foundation right would be really helpful! I'm in circles now with the python version -- module install alignment.
From Terminal:
--- python --- module is found
Kevins-MBP:~ kevin$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
>>>
--- python3 --- module not found
Kevins-MBP:~ kevin$ python3
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'nltk'
>>>