from graph_tool.all import * gives ImportError

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

from graph_tool.all import * gives ImportError

vineeshvs
I tried the following command in Python and ipython prompt (2.7 version)

---------------------------------------------------------------------------
In
[1]: from graph_tool.all import *
---------------------------------------------------------------------------
Its giving the following error. How can we solve it?
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-100bbe2bc9d9> in <module>()
----> 1 from graph_tool.all import *

/usr/lib/python2.7/dist-packages/graph_tool/__init__.py in <module>()
    103 
    104 from .dl_import import *
--> 105 dl_import("from . import libgraph_tool_core as libcore")
    106 __version__ = libcore.mod_info().version
    107 

/usr/lib/python2.7/dist-packages/graph_tool/dl_import.pyc in dl_import(import_expr)
     55 
     56     try:
---> 57         exec(import_expr, local_dict, global_dict)
     58     finally:
     59         sys.setdlopenflags(orig_dlopen_flags)  # reset it to normal case to

<string> in <module>()

ImportError: /usr/lib/python2.7/dist-packages/graph_tool/libgraph_tool_core.so: undefined symbol: _ZN5boost9iostreams4zlib6finishE
---------------------------------------------------------------------------
Thanks

_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
Reply | Threaded
Open this post in threaded view
|

Re: from graph_tool.all import * gives ImportError

Tiago Peixoto
Administrator
On 28.06.2016 07:38, vineesh vs wrote:
> ImportError: /usr/lib/python2.7/dist-packages/graph_tool/libgraph_tool_core.so: undefined symbol: _ZN5boost9iostreams4zlib6finishE

Undefined symbols like this probably just mean a compilation
problem. Probably you are linking with a different boost version than
the one you used to compile.

In order to make it possible to people to help you, it is not sufficient
to simply show the error message. You need to give more precise
information about your system (OS, compiler, boost version, etc),
and how you performed the compilation (arguments passed to configure,
contents of config.log, etc).

Best,
Tiago

--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (836 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
Reply | Threaded
Open this post in threaded view
|

Re: from graph_tool.all import * gives ImportError

vineeshvs
> You need to give more precise
> information about your system (OS, compiler, boost version, etc),
> and how you performed the compilation (arguments passed to configure,
> contents of config.log, etc).

System info:
Mem: 3.7 GiB
Processor: Intel® Core™ i5-3550 CPU @ 3.30GHz × 4
Graphics: Intel® Ivybridge Desktop
OS: Ubuntu 16.04 LTS, 64-bit

Compiler
gcc (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413
g++ (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413

boost version: 1.61

Config command used
./configure LDFLAGS=-L/home/vineeshvs/software/boost_1_61_0/libs  --with-boost-coroutine=boost_coroutine

PFA config.log
config.log
Reply | Threaded
Open this post in threaded view
|

Re: from graph_tool.all import * gives ImportError

Tiago Peixoto
Administrator
On 29.06.2016 18:08, vineeshvs wrote:
> OS: Ubuntu 16.04 LTS, 64-bit

If you are using Ubuntu 16.04, you can just install numpy that comes
with the system.

--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (836 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
Reply | Threaded
Open this post in threaded view
|

Re: from graph_tool.all import * gives ImportError

cdon
In reply to this post by Tiago Peixoto
if this is due to linking to the boost which I did not use to compile,

How would I go about figuring out which boost I am linked with? I only have
one boost, it is locally installed, and the python is in a virtual
environment to which I manually installed graph tool.  I know that
everything is here, and that it should work, but I am getting this exact
error, and am not sure where to look for this incorrect linkage on the
python side...???



--
Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
Reply | Threaded
Open this post in threaded view
|

Re: from graph_tool.all import * gives ImportError

Tiago Peixoto
Administrator
Am 20.06.2018 um 19:49 schrieb cdon:
> if this is due to linking to the boost which I did not use to compile,
>
> How would I go about figuring out which boost I am linked with? I only have
> one boost, it is locally installed, and the python is in a virtual
> environment to which I manually installed graph tool.  I know that
> everything is here, and that it should work, but I am getting this exact
> error, and am not sure where to look for this incorrect linkage on the
> python side...???

It is impossible to say anything without more concrete information, i.e.
output of ./configure, contents of config.log, etc.


--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>