when I “import nltk” show selectSelector error
when I “import nltk” show selectSelector error
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/hexialong/anaconda3/lib/python3.6/site-packages/nltk/__init__.py", line 89, in <module>
from nltk.internals import config_java
File "/Users/hexialong/anaconda3/lib/python3.6/site-packages/nltk/internals.py", line 11, in <module>
import subprocess
File "/Users/hexialong/anaconda3/lib/python3.6/subprocess.py", line 138, in <module>
import selectors
File "/Users/hexialong/anaconda3/lib/python3.6/selectors.py", line 290, in <module>
class SelectSelector(_BaseSelectorImpl):
File "/Users/hexialong/anaconda3/lib/python3.6/selectors.py", line 317, in SelectSelector
_select = select.select
AttributeError: module 'select' has no attribute 'select'
My environment is MacOS and python version is 3.6
What is the output of
import os; os.listdir('.')
?– alvas
Sep 11 '18 at 12:35
import os; os.listdir('.')
1 Answer
1
select
is a Python standard module. Maybe you should check that your python
binaries are unbroken or just reinstall it.
Check that:import select
and select.select
in Python Interactive Environment. If some errors generated, you'd better reinstall the python
binaries.
select
python
import select
select.select
python
it seems that when I import select ,it works . thank you very much!
– D.Lonny
Sep 13 '18 at 10:00
lol, you can choose my answer as correct answer then this question will be labeled solved.
– r3dir3ct
Sep 13 '18 at 12:44
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
add that info by editing your question rather than posting it as comments
– FlyingTeller
Sep 10 '18 at 11:10