Python 如何使用 conda 安装 pydotplus
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36979421/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I use conda to install pydotplus
提问by Chen Xu
I execute the code following on my machine( Win10, python 2.7, Anaconda&Spyder) and meet ImportError: No module named pydotplus
.
我在我的机器上执行以下代码(Win10、python 2.7、Anaconda&Spyder)并满足ImportError: No module named pydotplus
.
import networkx as nx
from networkx.drawing.nx_pydot import write_dot
G = nx.DiGraph([(1,2),(2,3),(3,2)])
write_dot(G,'file.dot')
It clearly that I should install pydotplus
package. I try to conda install pydotplus
directly but says Error: Package missing in current win-64 channels
. Then, I google itbut find there is no information about how to install it on conda. By the way, I have install pydot
on conda before.
很明显我应该安装pydotplus
包。我试着conda install pydotplus
直接但说Error: Package missing in current win-64 channels
。然后,我用谷歌搜索它,但发现没有关于如何在 conda 上安装它的信息。顺便说一下,我pydot
之前在 conda 上安装过。
Thanks for you help in advance!
感谢您提前提供帮助!
回答by Kevin Crain
- Using
conda install
command below worked for me (globally installed):
- 使用
conda install
以下命令对我有用(全局安装):
conda install -c conda-forge pydotplus
conda install -c conda-forge pydotplus
- Using Anaconda environments (per environment instance) you can install
pydotplus
usingpip
:
- 使用 Anaconda 环境(每个环境实例),您可以
pydotplus
使用pip
以下命令进行安装:
pip install pydotplus
pip install pydotplus
I would personally recommend using the Anaconda environments to install your packages for a given solution as its a more modular and cleaner way of building solutions with Anaconda.
我个人建议使用 Anaconda 环境来安装给定解决方案的软件包,因为它是使用 Anaconda 构建解决方案的一种更加模块化和更简洁的方式。
Installing via Anaconda environments referenced from answer on Quora
, see:
https://www.quora.com/How-do-I-install-Python-packages-in-Anaconda
通过从答案中引用的 Anaconda 环境进行安装Quora
,请参阅:https:
//www.quora.com/How-do-I-install-Python-packages-in-Anaconda
回答by Matiji66
I tried conda install pydotplus
, but it failed.
我试过了conda install pydotplus
,但失败了。
Then tried python -m pip install pydotplus
and it worked.
然后试了一下python -m pip install pydotplus
,成功了。
回答by Aric
Try
尝试
pip install pydotplus
if it isn't part of the conda universe.
如果它不是 conda 宇宙的一部分。
回答by Ayush Kesarwani
Open Anaconda prompt:
打开 Anaconda 提示:
pip install pydotplus