简体   繁体   English

即使在pip安装pydotplus之后,它仍然说没有名为“ pydotplus”的模块应该怎么做?

[英]Even after pip install pydotplus it says No module named 'pydotplus' what should be done?

from sklearn.externals.six import StringIO  
from IPython.display import Image 
from sklearn.tree import export_graphviz
import pydotplus

ModuleNotFoundError: No module named 'pydotplus' ModuleNotFoundError:没有名为“ pydotplus”的模块

Since you are using conda, you should use conda installer instead of the pip one. 由于使用的是conda,因此应使用conda安装程序而不是pip安装程序。 As per documentation : 根据文档

Installing pydotplus from the conda-forge channel can be achieved by adding conda-forge to your channels with: 从conda-forge通道安装pydotplus可以通过使用以下方法将conda-forge添加到您的通道中来实现:

conda config --add channels conda-forge

Once the conda-forge channel has been enabled, pydotplus can be installed with: 启用conda-forge频道后,可以使用以下方法安装pydotplus:

conda install pydotplus

python -m pip install pydotplus 

For Windows 10: 对于Windows 10:

Try running anaconda prompt as 'administrator', then use: 尝试以“管理员”身份运行anaconda提示符,然后使用:

conda install -c conda-forge pydotplus 康达安装-c康达伪造pydotplus

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM