Closed Yif18 closed 6 years ago
I'm not familiar with Anaconda. Can you check if pynlpir is actually being imported as a module and what version it is?
import pynlpir
print(pynlpir.__version__)
print(dir(pynlpir))
This problem is caused by the name of your python script.
Rename your script, do not use 'pynlpir.py'.
python would load your file before load the pynlpir library.
@lomizandtyd Nice job noticing that 😄
import pynlpir pynlpir.open()
F:\Anaconda2\python.exe F:/PycharmProjects/yif001/pynlpir.py Traceback (most recent call last): File "F:/PycharmProjects/yif001/pynlpir.py", line 2, in
import pynlpir
File "F:\PycharmProjects\yif001\pynlpir.py", line 3, in
pynlpir.open()
AttributeError: 'module' object has no attribute 'open'