How to use conda to install pydotplus

I execute the code following on my machine (Win10, python 2.7, Anaconda & Spyder) and encounter 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 is clear that I have to install the pydotplus package. I try conda install pydotplus directly, but says Error: Package missing in current win-64 channels . Then I google it , but did not find that there is no information on how to install it on conda. By the way, I installed pydot on conda before.

Thanks for the help!

+6
source share
5 answers
  • Using the conda install command below worked for me (globally installed):

conda install -c conda-forge pydotplus

  • Using Anaconda environments (for each instance of the environment), you can install pydotplus using pip :

pip install pydotplus

I personally would recommend using Anaconda environments to install your packages for this solution as a more modular and cleaner way to create solutions using Anaconda.

Installing through the Anaconda environment indicated in the Quora answer, see: https://www.quora.com/How-do-I-install-Python-packages-in-Anaconda

+13
source

I tried conda install pydotplus but it failed.

Then python -m pip install pydotplus and it worked.

+4
source

Try

 pip install pydotplus 

if it is not part of the conda universe.

+1
source

Open the Anaconda prompt:

 pip install pydotplus 
+1
source

I am using Ubuntu 18.04 and getting an error message: ModuleNotFoundError: There is no module named 'pydotplus' I used these commands to install pydotplus:

 sudo apt install python-pydot python-pydot-ng graphviz pip install pydotplus pip install --upgrade pip 
0
source

All Articles