ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 01 Jan 2021 19:43:07 +0100FeatureNotPresentError: linking issue with CSDPhttps://ask.sagemath.org/question/54127/featurenotpresenterror-linking-issue-with-csdp/I'm trying to use the Lovász theta-function for graphs. When I attempt to use the function, I get the following error:
---------------------------------------------------------------------------
FeatureNotPresentError Traceback (most recent call last)
<ipython-input-9-3a9a00f477b1> in <module>
1 g = graphs.CycleGraph(Integer(7))
----> 2 lovasz_bound(g, Integer(2))
<ipython-input-2-d57428a0d48f> in lovasz_bound(G, k)
27 def lovasz_bound(G, k):
28 H = power_graph(G, k)
---> 29 return H.lovasz_theta()
30
31
/usr/lib/python3/dist-packages/sage/graphs/lovasz_theta.py in lovasz_theta(graph)
66
67 from sage.features.csdp import CSDP
---> 68 CSDP().require()
69
70 g = graph.relabel(inplace=False, perm=range(1, n + 1)).networkx_graph()
/usr/lib/python3/dist-packages/sage/features/__init__.py in require(self)
189 presence = self.is_present()
190 if not presence:
--> 191 raise FeatureNotPresentError(self, presence.reason, presence.resolution)
192
193 def __repr__(self):
FeatureNotPresentError: CSDP is not available.
Executable 'theta' not found on PATH.
To install CSDP you can try to run 'sage -i csdp'
It thus seems to be unable to find the CSDP package which it uses to compute the Lovász theta-function.
I'm running Ubuntu 20.04, and have installed SageMath 9.0 via the APT package manager. Therefore, I cannot use 'sage -i' to install packages. I have installed CSDP separately via the package manager as well (the 'coinor-csdp' package), but SageMath doesn't seem to pick it up. I can access CSDP from the command line just fine.
Is there a way to manually link the package? Or is it not possible to use such packages when installing from the APT repositories and should I install from SageMath's binaries?
Many thanks in advance.
**Edit:** I have decided to install the SageMath binaries directly, and everything now works perfectly.Thu, 05 Nov 2020 20:25:38 +0100https://ask.sagemath.org/question/54127/featurenotpresenterror-linking-issue-with-csdp/Comment by slelievre for <p>I'm trying to use the Lovász theta-function for graphs. When I attempt to use the function, I get the following error:</p>
<pre><code>---------------------------------------------------------------------------
FeatureNotPresentError Traceback (most recent call last)
<ipython-input-9-3a9a00f477b1> in <module>
1 g = graphs.CycleGraph(Integer(7))
----> 2 lovasz_bound(g, Integer(2))
<ipython-input-2-d57428a0d48f> in lovasz_bound(G, k)
27 def lovasz_bound(G, k):
28 H = power_graph(G, k)
---> 29 return H.lovasz_theta()
30
31
/usr/lib/python3/dist-packages/sage/graphs/lovasz_theta.py in lovasz_theta(graph)
66
67 from sage.features.csdp import CSDP
---> 68 CSDP().require()
69
70 g = graph.relabel(inplace=False, perm=range(1, n + 1)).networkx_graph()
/usr/lib/python3/dist-packages/sage/features/__init__.py in require(self)
189 presence = self.is_present()
190 if not presence:
--> 191 raise FeatureNotPresentError(self, presence.reason, presence.resolution)
192
193 def __repr__(self):
FeatureNotPresentError: CSDP is not available.
Executable 'theta' not found on PATH.
To install CSDP you can try to run 'sage -i csdp'
</code></pre>
<p>It thus seems to be unable to find the CSDP package which it uses to compute the Lovász theta-function. </p>
<p>I'm running Ubuntu 20.04, and have installed SageMath 9.0 via the APT package manager. Therefore, I cannot use 'sage -i' to install packages. I have installed CSDP separately via the package manager as well (the 'coinor-csdp' package), but SageMath doesn't seem to pick it up. I can access CSDP from the command line just fine. </p>
<p>Is there a way to manually link the package? Or is it not possible to use such packages when installing from the APT repositories and should I install from SageMath's binaries?</p>
<p>Many thanks in advance.</p>
<p><strong>Edit:</strong> I have decided to install the SageMath binaries directly, and everything now works perfectly.</p>
https://ask.sagemath.org/question/54127/featurenotpresenterror-linking-issue-with-csdp/?comment=55059#post-id-55059Glad you were able to solve by installing binaries!Fri, 01 Jan 2021 18:20:40 +0100https://ask.sagemath.org/question/54127/featurenotpresenterror-linking-issue-with-csdp/?comment=55059#post-id-55059Answer by slelievre for <p>I'm trying to use the Lovász theta-function for graphs. When I attempt to use the function, I get the following error:</p>
<pre><code>---------------------------------------------------------------------------
FeatureNotPresentError Traceback (most recent call last)
<ipython-input-9-3a9a00f477b1> in <module>
1 g = graphs.CycleGraph(Integer(7))
----> 2 lovasz_bound(g, Integer(2))
<ipython-input-2-d57428a0d48f> in lovasz_bound(G, k)
27 def lovasz_bound(G, k):
28 H = power_graph(G, k)
---> 29 return H.lovasz_theta()
30
31
/usr/lib/python3/dist-packages/sage/graphs/lovasz_theta.py in lovasz_theta(graph)
66
67 from sage.features.csdp import CSDP
---> 68 CSDP().require()
69
70 g = graph.relabel(inplace=False, perm=range(1, n + 1)).networkx_graph()
/usr/lib/python3/dist-packages/sage/features/__init__.py in require(self)
189 presence = self.is_present()
190 if not presence:
--> 191 raise FeatureNotPresentError(self, presence.reason, presence.resolution)
192
193 def __repr__(self):
FeatureNotPresentError: CSDP is not available.
Executable 'theta' not found on PATH.
To install CSDP you can try to run 'sage -i csdp'
</code></pre>
<p>It thus seems to be unable to find the CSDP package which it uses to compute the Lovász theta-function. </p>
<p>I'm running Ubuntu 20.04, and have installed SageMath 9.0 via the APT package manager. Therefore, I cannot use 'sage -i' to install packages. I have installed CSDP separately via the package manager as well (the 'coinor-csdp' package), but SageMath doesn't seem to pick it up. I can access CSDP from the command line just fine. </p>
<p>Is there a way to manually link the package? Or is it not possible to use such packages when installing from the APT repositories and should I install from SageMath's binaries?</p>
<p>Many thanks in advance.</p>
<p><strong>Edit:</strong> I have decided to install the SageMath binaries directly, and everything now works perfectly.</p>
https://ask.sagemath.org/question/54127/featurenotpresenterror-linking-issue-with-csdp/?answer=55061#post-id-55061Solving the linking issue without requiring to install from binaries is now tracked at
- [Sage Trac ticket 31145: spkg-configure and distros/ for csdp](https://trac.sagemath.org/ticket/31145)Fri, 01 Jan 2021 19:43:07 +0100https://ask.sagemath.org/question/54127/featurenotpresenterror-linking-issue-with-csdp/?answer=55061#post-id-55061