ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 07 Apr 2017 10:27:12 -0500Use system-wide installation of graphviz in sage?https://ask.sagemath.org/question/37188/use-system-wide-installation-of-graphviz-in-sage/ I am trying to install pygraphviz in sage 7.3 on a Debian jessy machine, but it already fails at:
`sage -i graphviz`
================================ WARNING =================================
You are about to download and install an unmaintained experimental
package. This probably won't work at all for you! There is no guarantee
that it will build correctly, or behave as expected. Use at your own risk!
This package will be removed in future versions of SageMath. If you care
about this package, you should make a proper new-style package instead.
For more information about making Sage packages, see
http://doc.sagemath.org/html/en/developer/packaging.html
==========================================================================
I don't want to break sage, so I am wondering if there is a way to make sage use the system-wide installation of pygraphviz instead.
Thu, 06 Apr 2017 03:13:45 -0500https://ask.sagemath.org/question/37188/use-system-wide-installation-of-graphviz-in-sage/Comment by stan for <p>I am trying to install pygraphviz in sage 7.3 on a Debian jessy machine, but it already fails at:
<code>sage -i graphviz</code></p>
<pre><code>================================ WARNING =================================
You are about to download and install an unmaintained experimental
package. This probably won't work at all for you! There is no guarantee
that it will build correctly, or behave as expected. Use at your own risk!
This package will be removed in future versions of SageMath. If you care
about this package, you should make a proper new-style package instead.
For more information about making Sage packages, see
http://doc.sagemath.org/html/en/developer/packaging.html
==========================================================================
</code></pre>
<p>I don't want to break sage, so I am wondering if there is a way to make sage use the system-wide installation of pygraphviz instead.</p>
https://ask.sagemath.org/question/37188/use-system-wide-installation-of-graphviz-in-sage/?comment=37190#post-id-37190I followed the instructions here: http://stackoverflow.com/questions/15661384/python-does-not-see-pygraphviz
Now running the SMC docker with sage 7.5.1 locally, I installed pygraphviz both system wide and in `sage-sh`, with the result that I can run:
python
import pygraphviz
but if I run
sage
import pygraphviz
I get:
`ImportError: No module named pygraphviz`
I really don't know what I am doing here and what I should do. Help!Thu, 06 Apr 2017 04:56:34 -0500https://ask.sagemath.org/question/37188/use-system-wide-installation-of-graphviz-in-sage/?comment=37190#post-id-37190Answer by tmonteil for <p>I am trying to install pygraphviz in sage 7.3 on a Debian jessy machine, but it already fails at:
<code>sage -i graphviz</code></p>
<pre><code>================================ WARNING =================================
You are about to download and install an unmaintained experimental
package. This probably won't work at all for you! There is no guarantee
that it will build correctly, or behave as expected. Use at your own risk!
This package will be removed in future versions of SageMath. If you care
about this package, you should make a proper new-style package instead.
For more information about making Sage packages, see
http://doc.sagemath.org/html/en/developer/packaging.html
==========================================================================
</code></pre>
<p>I don't want to break sage, so I am wondering if there is a way to make sage use the system-wide installation of pygraphviz instead.</p>
https://ask.sagemath.org/question/37188/use-system-wide-installation-of-graphviz-in-sage/?answer=37194#post-id-37194The reason why this does not work is that Sage uses its own virtual environment, and does no uses system-wide python packages. Here is how to do, from the command line:
Install graphviz on your system:
apt install graphviz
Then install pygraphviz with Sage environment:
sage -pip install pygraphviz
Thu, 06 Apr 2017 09:49:09 -0500https://ask.sagemath.org/question/37188/use-system-wide-installation-of-graphviz-in-sage/?answer=37194#post-id-37194Comment by tmonteil for <p>The reason why this does not work is that Sage uses its own virtual environment, and does no uses system-wide python packages. Here is how to do, from the command line:</p>
<p>Install graphviz on your system:</p>
<pre><code>apt install graphviz
</code></pre>
<p>Then install pygraphviz with Sage environment:</p>
<pre><code>sage -pip install pygraphviz
</code></pre>
https://ask.sagemath.org/question/37188/use-system-wide-installation-of-graphviz-in-sage/?comment=37226#post-id-37226It is the standard way to install pip-installable packages. Both methods are very similar. I prefer the sage -pip` since there is no subsheel so that i can use it within scripts.Fri, 07 Apr 2017 10:27:12 -0500https://ask.sagemath.org/question/37188/use-system-wide-installation-of-graphviz-in-sage/?comment=37226#post-id-37226Comment by stan for <p>The reason why this does not work is that Sage uses its own virtual environment, and does no uses system-wide python packages. Here is how to do, from the command line:</p>
<p>Install graphviz on your system:</p>
<pre><code>apt install graphviz
</code></pre>
<p>Then install pygraphviz with Sage environment:</p>
<pre><code>sage -pip install pygraphviz
</code></pre>
https://ask.sagemath.org/question/37188/use-system-wide-installation-of-graphviz-in-sage/?comment=37216#post-id-37216No way, that simple! Thank you!! Is `sage -pip` generally the correct way of installing packages in sage? I read somewhere about doing
sage -sh
pip installFri, 07 Apr 2017 02:23:11 -0500https://ask.sagemath.org/question/37188/use-system-wide-installation-of-graphviz-in-sage/?comment=37216#post-id-37216