Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use conda to install pydotplus

I execute the code following on my machine( Win10, python 2.7, Anaconda&Spyder) and meet 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 it but find there is no information about how to install it on conda. By the way, I have install pydot on conda before.

Thanks for you help in advance!

like image 530
Chen Xu Avatar asked May 02 '16 09:05

Chen Xu


People also ask

How do I install packages in anaconda environment?

Go to Environments tab just below the Home tab and from there we can check what all packages are installed and what is not. It is very easy to install any package through anaconda navigator, simply search the required package, select package and click on apply to install it.

How do I install PyDotPlus with graphviz?

1) To install graphviz and pydotplus , you need to open the Terminal application. To do this, open the Applications folder, then open the Utilities folder and open the Terminal application. You can also locate the Teminal application using Spotlight.

What is PyDotPlus module in Python?

PyDotPlus is an improved version of the old pydot project that provides a Python Interface to Graphviz's Dot language.


1 Answers

  • Using conda install command below worked for me (globally installed):

conda install -c conda-forge pydotplus

  • Using Anaconda environments (per environment instance) you can install pydotplus using pip:

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.

Installing via Anaconda environments referenced from answer on Quora, see: https://www.quora.com/How-do-I-install-Python-packages-in-Anaconda

like image 76
Kevin Crain Avatar answered Sep 22 '22 14:09

Kevin Crain