>>> 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
答案 0 :(得分:0)
select
是Python标准模块。也许您应该检查您的python
二进制文件是否未损坏,或者只是重新安装它。
检查:
import select
和select.select
在Python互动环境中。如果产生了一些错误,则最好重新安装python
二进制文件。