Error in installing graph-tool in Ubuntu 18.04
I followed the installation instructions in the website: https://git.skewed.de/count0/graph-tool/-/wikis/installation-instructions for installing graph-tool on Ubuntu 18.04, but when I write "sudo apt-get install python3-graph-tool" in the terminal, it gives me the following error: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: python3-graph-tool : Depends: libboost-context1.67.0 but it is not installable Depends: libboost-iostreams1.67.0 but it is not installable Depends: libboost-python1.67.0 but it is not installable Depends: libboost-python1.67.0-py38 but it is not installable Depends: libboost-regex1.67.0-icu63 but it is not installable Depends: libc6 (>= 2.29) but 2.27-3ubuntu1 is to be installed Depends: libgcc-s1 (>= 3.4) but it is not installable Depends: libgomp1 (>= 9) but 8.4.0-1ubuntu1~18.04 is to be installed Depends: libstdc++6 (>= 9) but 8.4.0-1ubuntu1~18.04 is to be installed E: Unable to correct problems, you have held broken packages. Does anyone know how I can fix it? -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
Am 28.04.20 um 18:59 schrieb Narges:
I followed the installation instructions in the website:
https://git.skewed.de/count0/graph-tool/-/wikis/installation-instructions
for installing graph-tool on Ubuntu 18.04, but when I write "sudo apt-get install python3-graph-tool" in the terminal, it gives me the following error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-graph-tool : Depends: libboost-context1.67.0 but it is not installable
Depends: libboost-iostreams1.67.0 but it is not installable
Depends: libboost-python1.67.0 but it is not installable
Depends: libboost-python1.67.0-py38 but it is not installable
Depends: libboost-regex1.67.0-icu63 but it is not installable
Depends: libc6 (>= 2.29) but 2.27-3ubuntu1 is to be installed Depends: libgcc-s1 (>= 3.4) but it is not installable
Depends: libgomp1 (>= 9) but 8.4.0-1ubuntu1~18.04 is to be installed
Depends: libstdc++6 (>= 9) but 8.4.0-1ubuntu1~18.04 is to be installed
E: Unable to correct problems, you have held broken packages.
Does anyone know how I can fix it?
I can't reproduce this. Following the instructions on Ubuntu 18.04 (bionic beaver) works fine. Can you please let us know exactly which line did you add to sources.list? Did you run 'apt-get update' afterwards? Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
I added these lines to /etc/apt/sources.list: deb [ arch=amd64 ] https://downloads.skewed.de/apt bullseye main deb [ arch=amd64 ] https://downloads.skewed.de/apt buster main deb [ arch=amd64 ] https://downloads.skewed.de/apt sid main deb https://downloads.skewed.de/apt/raring raring universe deb-src https://downloads.skewed.de/apt/raring raring universe deb [ arch=amd64 ] https://downloads.skewed.de/apt bionic main deb [ arch=amd64 ] https://downloads.skewed.de/apt bionic beaver main And after that I wrote "sudo apt-get update" and then "sudo apt-get install python3-graph-tool". But the problem still is not solved. -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
Am 28.04.20 um 19:32 schrieb Narges:
I added these lines to /etc/apt/sources.list:
deb [ arch=amd64 ] https://downloads.skewed.de/apt bullseye main deb [ arch=amd64 ] https://downloads.skewed.de/apt buster main deb [ arch=amd64 ] https://downloads.skewed.de/apt sid main deb https://downloads.skewed.de/apt/raring raring universe deb-src https://downloads.skewed.de/apt/raring raring universe deb [ arch=amd64 ] https://downloads.skewed.de/apt bionic main deb [ arch=amd64 ] https://downloads.skewed.de/apt bionic beaver main
And after that I wrote "sudo apt-get update" and then "sudo apt-get install python3-graph-tool". But the problem still is not solved.
Why did you add all these lines? You only need the one for your distribution: deb [ arch=amd64 ] https://downloads.skewed.de/apt bionic main -- Tiago de Paula Peixoto <tiago@skewed.de>
Thank you so much. I removed the other lines and now it works. I really appreciate you. -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
Although I installed graph-tool, when I write "from graph_tool.all import *", it shows an error that "No module named graph_tool". -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
Am 28.04.20 um 20:10 schrieb Narges:
Although I installed graph-tool, when I write "from graph_tool.all import *", it shows an error that "No module named graph_tool".
Double check you are using the correct Python 3 interpreter, i.e. not Python 2, or an installation different from the system's (e.g. Anaconda). -- Tiago de Paula Peixoto <tiago@skewed.de>
I am using python3. I also have python2, but I tried python3. I am not using Anaconda. -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
Am 28.04.20 um 20:15 schrieb Narges:
I am using python3. I also have python2, but I tried python3. I am not using Anaconda.
Well, I don't have mind reading abilities, nor do I have access to an oracle. All I can say is that invoking the standard Python 3 interpreter in Ubuntu 18.04 works perfectly fine for me, so this must be something at your end. In general, just saying "it does not work" is next to useless, as it gives very little information for those that might want to help. You have to try to give more information, explaining *exactly* what you are doing, etc. -- Tiago de Paula Peixoto <tiago@skewed.de>
OK, when I write "sudo apt-get install python3-graph-tool", it says "python3-graph-tool is already the newest version (2.31-2).". Then, when I want to run the code shown below: #Start of the code: *# Girvan - Newman # igraph import networkx as nx from igraph import * import tempfile import igraph as ig import pyintergraph from graph_tool.all import * #g = read_graph("Network.graphml", format = c("graphml")) g = nx.read_graphml("Network.graphml") # nx_graph = nx.karate_club_graph() graph_tool_graph = pyintergraph.nx2gt(g, labelname="node_label") igraph_graph = pyintergraph.gt2igraph(graph_tool_graph, labelname="node_label") # reversed_nx_graph = pyintergraph.igraph2nx(igraph_graph) # fobj = tempfile.NamedTemporaryFile() g2 = nx.path_graph(4) nx.write_gml(g2, 'test.gml') # g = Graph.Read_GML("test.gml") d = igraph_graph.community_edge_betweenness() p = d.as_clustering() Q = igraph_graph.modularity(p) print(d) print(p) print(Q) # End of the code I write " python3 GirvanIgraph.py" in a terminal and GirvanIgraph.py is the name of the file, it shows the following error: Traceback (most recent call last): File "GirvanIgraph.py", line 9, in <module> from graph_tool.all import * ModuleNotFoundError: No module named 'graph_tool' -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
Are you certain that you are using system python? What does `which python3` return? Do other python packages installed via apt function as expected? Sent from my phone
On 28 Apr 2020, at 19:40, Narges <nzarnaghi@tamu.edu> wrote:
OK, when I write "sudo apt-get install python3-graph-tool", it says "python3-graph-tool is already the newest version (2.31-2).". Then, when I want to run the code shown below:
#Start of the code:
*# Girvan - Newman # igraph
import networkx as nx from igraph import * import tempfile import igraph as ig import pyintergraph from graph_tool.all import *
#g = read_graph("Network.graphml", format = c("graphml")) g = nx.read_graphml("Network.graphml")
# nx_graph = nx.karate_club_graph()
graph_tool_graph = pyintergraph.nx2gt(g, labelname="node_label") igraph_graph = pyintergraph.gt2igraph(graph_tool_graph, labelname="node_label") # reversed_nx_graph = pyintergraph.igraph2nx(igraph_graph)
# fobj = tempfile.NamedTemporaryFile() g2 = nx.path_graph(4) nx.write_gml(g2, 'test.gml')
# g = Graph.Read_GML("test.gml") d = igraph_graph.community_edge_betweenness() p = d.as_clustering()
Q = igraph_graph.modularity(p)
print(d) print(p) print(Q)
# End of the code
I write " python3 GirvanIgraph.py" in a terminal and GirvanIgraph.py is the name of the file, it shows the following error:
Traceback (most recent call last): File "GirvanIgraph.py", line 9, in <module> from graph_tool.all import * ModuleNotFoundError: No module named 'graph_tool'
-- Sent from: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmain-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com%2F&data=02%7C01%7CRedfernJM%40cardiff.ac.uk%7C1655bf5f314c488a5a2e08d7eba3a9b6%7Cbdb74b3095684856bdbf06759778fcbc%7C1%7C0%7C637236960470199932&sdata=COyHrIjdNwXTqHzHb5yBwSHie9BEwGBDDR8EHwHgF0o%3D&reserved=0 _______________________________________________ graph-tool mailing list graph-tool@skewed.de https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.skewed.de%2Fmailman%2Flistinfo%2Fgraph-tool&data=02%7C01%7CRedfernJM%40cardiff.ac.uk%7C1655bf5f314c488a5a2e08d7eba3a9b6%7Cbdb74b3095684856bdbf06759778fcbc%7C1%7C0%7C637236960470209931&sdata=iSsAXIMjygXunip8t9A4vO3JdCBr3YBshJ2la7G6%2BLk%3D&reserved=0
Oh, you are right. when I write "which python3", it says "/home/narges/miniconda3/bin/python3". So, it is using miniconda3. How can I use system python? -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
Anaconda works by injecting itself into your PATH environmental variable. Running `conda deactivate` should remove it. As an alternative, you could install the graph-tool anaconda package via `conda install -c conda-forge graph-tool`. Sent from my phone
On 28 Apr 2020, at 19:47, Narges <nzarnaghi@tamu.edu> wrote:
Oh, you are right. when I write "which python3", it says "/home/narges/miniconda3/bin/python3". So, it is using miniconda3. How can I use system python?
-- Sent from: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmain-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com%2F&data=02%7C01%7CRedfernJM%40cardiff.ac.uk%7C73dd4e27f5104bc00bd508d7eba4981f%7Cbdb74b3095684856bdbf06759778fcbc%7C1%7C0%7C637236964478118886&sdata=NXPvXx9Frh6qSqUTpcW6KrYxQOVlXIIz%2BrAeJ7FZrlY%3D&reserved=0 _______________________________________________ graph-tool mailing list graph-tool@skewed.de https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.skewed.de%2Fmailman%2Flistinfo%2Fgraph-tool&data=02%7C01%7CRedfernJM%40cardiff.ac.uk%7C73dd4e27f5104bc00bd508d7eba4981f%7Cbdb74b3095684856bdbf06759778fcbc%7C1%7C0%7C637236964478118886&sdata=a7aFrAWtTSaGqtd1CP4aGTrBHtD6%2BROMv0apm8mpKXg%3D&reserved=0
Thank you so much. I tried both of your suggestions, but now when I run the program, it shows the following error: /home/narges/miniconda3/lib/python3.7/site-packages/graph_tool/draw/cairo_draw.py:1494: RuntimeWarning: Error importing Gtk module: No module named 'gi'; GTK+ drawing will not work. warnings.warn(msg, RuntimeWarning) Traceback (most recent call last): File "GirvanIgraph.py", line 18, in <module> igraph_graph = pyintergraph.gt2igraph(graph_tool_graph, labelname="node_label") File "/home/narges/miniconda3/lib/python3.7/site-packages/pyintergraph/funcs.py", line 17, in gt2igraph return G.to_igraph() File "/home/narges/miniconda3/lib/python3.7/site-packages/pyintergraph/Graph.py", line 289, in to_igraph iG.vs[i].update_attributes(name=self.node_labels[node], **attr) TypeError: update_attributes() got multiple values for keyword argument 'name' -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
Thank you so much. It is solved. My mistake was that I wrote 'conda deactivate' in the home directory instead of the code's directory. But now it shows another error. When I run my code, it shows this error: Traceback (most recent call last): File "GirvanIgraph.py", line 18, in <module> igraph_graph = pyintergraph.gt2igraph(graph_tool_graph, labelname="node_label") File "/home/narges/.local/lib/python3.6/site-packages/pyintergraph/funcs.py", line 17, in gt2igraph return G.to_igraph() File "/home/narges/.local/lib/python3.6/site-packages/pyintergraph/Graph.py", line 289, in to_igraph iG.vs[i].update_attributes(name=self.node_labels[node], **attr) TypeError: update_attributes() got multiple values for keyword argument 'name' -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
Am 02.05.20 um 06:09 schrieb Narges:
Thank you so much. It is solved. My mistake was that I wrote 'conda deactivate' in the home directory instead of the code's directory. But now it shows another error. When I run my code, it shows this error:
Traceback (most recent call last): File "GirvanIgraph.py", line 18, in <module> igraph_graph = pyintergraph.gt2igraph(graph_tool_graph, labelname="node_label") File "/home/narges/.local/lib/python3.6/site-packages/pyintergraph/funcs.py", line 17, in gt2igraph return G.to_igraph() File "/home/narges/.local/lib/python3.6/site-packages/pyintergraph/Graph.py", line 289, in to_igraph iG.vs[i].update_attributes(name=self.node_labels[node], **attr) TypeError: update_attributes() got multiple values for keyword argument 'name'
Whenever reporting problems, just pasting the error message without any context is not very useful, since it becomes pure guesswork. Instead, you should provide a *minimal* and *self-contained* program that reproduces the problem you are encountering. Otherwise we cannot help. (Just guessing from the traceback, this seems to be triggered by the "pyintergraph' package rather than graph-tool, in which case this would be the wrong mailing list to ask.) Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Thank you so much. The problem was in 'pyintergraph' package. I contacted them and it is solved. -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
participants (3)
-
Joseph Redfern -
Narges -
Tiago de Paula Peixoto