当我“导入nltk”时显示selectSelector错误

时间:2018-09-10 11:05:31

标签: python nltk selector

>>> 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'

我的环境是MacOS,python版本是3.6

1 个答案:

答案 0 :(得分:0)

select是Python标准模块。也许您应该检查您的python二进制文件是否未损坏,或者只是重新安装它。 检查: import selectselect.select在Python互动环境中。如果产生了一些错误,则最好重新安装python二进制文件。