Installing pygraphviz on Windows 10 64-bit, Python 3.6

Installing pygraphviz on Windows 10 64-bit, Python 3.6

Okay, here we go... I am trying to install pygraphviz on Windows 10. There are many solutions to this problem online, but none have yet worked for me. The precise problem I'm having is with this via jupyter notebook-->

Okay, here we go... I am trying to install pygraphviz on Windows 10. There are many solutions to this problem online, but none have yet worked for me. The precise problem I'm having is with this via jupyter notebook-->

[1] import networkx as nx
import pylab as plt
from networkx.drawing.nx_agraph import graphviz_layout

[2]G = nx.DiGraph() G.add_node(1,level=1) G.add_node(2,level=2) G.add_node(3,level=2) G.add_node(4,level=3)

G.add_edge(1,2) G.add_edge(1,3) G.add_edge(2,4)

nx.draw(G, pos=graphviz_layout(G), node_size=1600, cmap=plt.cm.Blues, node_color=range(len(G)), prog='dot') plt.show()

I get the following errors after [2]:

ModuleNotFoundError                       Traceback (most recent call last)
C:\Users\name\Anaconda3\lib\site-packages\networkx\drawing\nx_agraph.py 
in 
pygraphviz_layout(G, prog, root, args)
    254     try:
--> 255         import pygraphviz
    256     except ImportError:

ModuleNotFoundError: No module named 'pygraphviz'

and

ImportError                               Traceback (most recent call last)
<ipython-input-2-86a15892f0f0> in <module>()
  9 G.add_edge(2,4)
 10 
---> 11 nx.draw(G, pos=graphviz_layout(G), node_size=1600, cmap=plt.cm.Blues,
 12         node_color=range(len(G)),
 13         prog='dot')

C:\Users\name\Anaconda3\lib\site-packages\networkx\drawing\nx_agraph.py in graphviz_layout(G, prog, root, args) 226 227 """ --> 228 return pygraphviz_layout(G,prog=prog,root=root,args=args) 229 230 def pygraphviz_layout(G,prog='neato',root=None, args=''):

C:\Users\name\Anaconda3\lib\site-packages\networkx\drawing\nx_agraph.py in pygraphviz_layout(G, prog, root, args) 256 except ImportError: 257 raise ImportError('requires pygraphviz ', --> 258 'http://pygraphviz.github.io/') 259 if root is not None: 260 args+="-Groot=%s"%root

ImportError: ('requires pygraphviz ', 'http://pygraphviz.github.io/')

Here's what I've tried to resolve this

(1) Regular pip install: "pip install pygraphviz" This is the error I get at the end. EDIT I get the same error even if I run cmd as admin.

Command "C:\Users\name\Anaconda3\python.exe -u -c "import setuptools, 
tokenize;file='C:\Users\name1\AppData\Local\Temp\pip-build-
n81lykqs\pygraphviz\setup.py';f=getattr(tokenize, 'open', open)
(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, 
file, 'exec'))" install --record C:\Users\name1\AppData\Local\Temp\pip-
b3jz1lk5-record\install-record.txt --single-version-externally-managed --
compile" failed with error code 1 in C:\Users\name~1\AppData\Local\Temp\pip-
build-n81lykqs\pygraphviz

(2) Downloading and installing graphviz-2.38.msi, and then downloading both the 64-bit versions of the wheel. This is the result.

C:\Users\name\Anaconda3>pip install pygraphviz-1.3.1-cp34-none-
win_amd64.whl
pygraphviz-1.3.1-cp34-none-win_amd64.whl is not a supported wheel on this 
platform.

C:\Users\name\Anaconda3>pip install pygraphviz-1.3.1-cp27-none- win_amd64.whl pygraphviz-1.3.1-cp27-none-win_amd64.whl is not a supported wheel on this platform.

What I would like to try, but am not sure how to do properly:

Edit setup.py. I have read a lot about people finding solutions in changing the paths, but I'm not really sure how to do this. This method looks very complex.

Thank you for any help/insight!

python windows

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Basic Data Types in Python | Python Web Development For Beginners

In the programming world, Data types play an important role. Each Variable is stored in different data types and responsible for various functions. Python had two different objects, and They are mutable and immutable objects.

How To Compare Tesla and Ford Company By Using Magic Methods in Python

Magic Methods are the special methods which gives us the ability to access built in syntactical features such as ‘<’, ‘>’, ‘==’, ‘+’ etc.. You must have worked with such methods without knowing them to be as magic methods. Magic methods can be identified with their names which start with __ and ends with __ like __init__, __call__, __str__ etc. These methods are also called Dunder Methods, because of their name starting and ending with Double Underscore (Dunder).

How To Set Up A Python Virtual Environment On Windows 10

How To Set Up A Python Virtual Environment On Windows 10. A Virtual Environment or a “venv” is a Python module that creates a unique environment for each task or project.

Python Programming: A Beginner’s Guide

Python is an interpreted, high-level, powerful general-purpose programming language. You may ask, Python’s a snake right? and Why is this programming language named after it?

Hire Python Developers

Are you looking for experienced, reliable, and qualified Python developers? If yes, you have reached the right place. At **[HourlyDeveloper.io](https://hourlydeveloper.io/ "HourlyDeveloper.io")**, our full-stack Python development services...