import matplotlib failed in Anaconda python3.6

时光总嘲笑我的痴心妄想 提交于 2021-02-10 20:14:10

问题


I installed Anaconda to simplify the management of many python modules.

After that i tried to "import subprocess":

>>> import subprocess
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sej/.config/anaconda3/lib/python3.6/subprocess.py", line 155, in <module>
    _PopenSelector = selectors.SelectSelector
AttributeError: module 'selectors' has no attribute 'SelectSelector'

How to fix this?

I came accross this problem by trying to use matplotlib. When trying to import it, this error comes up:

>>> import matplotlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sej/.config/anaconda3/lib/python3.6/site-packages/matplotlib/__init__.py", line 127, in <module>
    from matplotlib.compat import subprocess
  File "/home/sej/.config/anaconda3/lib/python3.6/site-packages/matplotlib/compat/subprocess.py", line 27, in <module>
    import subprocess
  File "/home/sej/.config/anaconda3/lib/python3.6/subprocess.py", line 155, in <module>
    _PopenSelector = selectors.SelectSelector
AttributeError: module 'selectors' has no attribute 'SelectSelector'

来源:https://stackoverflow.com/questions/48609024/import-matplotlib-failed-in-anaconda-python3-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!