You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like pygraphviz is required but is not pulled via dependencies during installation (this is on Mac OS):
(finesse3) Artemiis-MacBook-Pro:~ admitriev$ python3
Python 3.8.2 (default, Mar 26 2020, 10:43:30)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from simba import transfer_function_to_graph, tf2rss, adiabatically_eliminate
>>> from sympy import symbols
>>> s = symbols('s')
>>> gamma_f, lmbda = symbols('gamma_f lambda', real=True, positive=True)
>>> tf = (s**2 + s * gamma_f - lmbda) / (s**2 - s * gamma_f - lmbda)
>>> transfer_function_to_graph(tf, 'active_coupled_cavity.png', layout='dot')
0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/admitriev/miniconda3/envs/finesse3/lib/python3.8/site-packages/simba/graph.py", line 266, in transfer_function_to_graph
g = nodes_from_dofs(*split_system(ss.to_slh())).as_graphviz_agraph()
File "/Users/admitriev/miniconda3/envs/finesse3/lib/python3.8/site-packages/simba/graph.py", line 113, in as_graphviz_agraph
import pygraphviz as pgv
ModuleNotFoundError: No module named 'pygraphviz'
Note that on Mac OS installing pygraphviz via pip requires graphviz to be already installed on the system, which can be done via brew or via conda if the latter is being used. I managed to get a working pygraphviz installation via
conda install graphviz
pip install pygraphviz
After doing that, the example code above worked without errors.
The text was updated successfully, but these errors were encountered:
Looks like
pygraphviz
is required but is not pulled via dependencies during installation (this is on Mac OS):Note that on Mac OS installing
pygraphviz
via pip requiresgraphviz
to be already installed on the system, which can be done viabrew
or viaconda
if the latter is being used. I managed to get a workingpygraphviz
installation viaAfter doing that, the example code above worked without errors.
The text was updated successfully, but these errors were encountered: