Receiving error messages while importing nltk

79 Views Asked by At

I was successfully able to install nltk and I have all the prerequisites installed as well.

Nonetheless I have been receiving error messages like these while importing nltk.

>>> import nltk
Traceback (most recent call last):
File "<pyshell#9>", line 1, in <module>
import nltk
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\nltk\__init__.py", line 128, in <module>
from nltk.chunk import *
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\nltk\chunk\__init__.py", line 157, in <module>
from nltk.chunk.api import ChunkParserI
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\nltk\chunk\api.py", line 13, in <module>
from nltk.parse import ParserI
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\nltk\parse\__init__.py", line 79, in <module>
from nltk.parse.transitionparser import TransitionParser
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\nltk\parse\transitionparser.py", line 21, in <module>
from sklearn.datasets import load_svmlight_file
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\sklearn\datasets\__init__.py", line 6, in <module>
from .base import load_breast_cancer
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\sklearn\datasets\base.py", line 20, in <module>
from ..utils import Bunch
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\sklearn\utils\__init__.py", line 11, in <module>
from .validation import (as_float_array,
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\sklearn\utils\validation.py", line 23, in <module>
from ..externals.joblib import Memory
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\sklearn\externals\joblib\__init__.py", line 127, in <module>
from .parallel import Parallel
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\sklearn\externals\joblib\parallel.py", line 25, in <module>
from ._multiprocessing_helpers import mp
File "C:\Users\Saurav\AppData\Local\Programs\Python\Python36-32\lib\site- 
packages\sklearn\externals\joblib\_multiprocessing_helpers.py", line 24, in 
<module>
_sem = mp.Semaphore()
AttributeError: module 'multiprocessing' has no attribute 'Semaphore'
0

There are 0 best solutions below