Installing python modules

Help
Anonymous
2012-08-24
2013-04-20

  • Anonymous
    2012-08-24

    I'm having trouble installing the python module on ubuntu 11.10.  First the module does not seem to exist in the as advertised quick install method.

    apt-get install tulip-python

    maybe I have the wrong name but I was trying to follow this:
    http://tulip.labri.fr/TulipDrupal/?q=node/1581

    all the other libraries are there except python?

    since this failed I tried to install from source Tulip 3.8.  Tulip runs and I even got the python interpreter to run from within Tulip but I can't seem to get "from tulip import *" to work within my own modules and scripts, its not pointing to the right location.  I tried to follow this:

    http://tulip.labri.fr/Documentation/3_6/pythonDoc/gettingstarted.html#using-the-bindings-from-the-tulip-software-gui

    but where it says:
    "Linux : <tulip_install_dir>/lib"
    I can't seem to find that directory, within my install directory there is a directory called "library" but linking to that did not do the trick. I have very little experience when it comes to c++ and building from source but the fact that the python interpreter works from within the Tulip GUI seems like a good sign the module is out there but I can't seem to find it.  I also can't seem to find the setup.py file anywhere on my system either. Any suggestions on where the python module is on my system after install?

     
  • Hi,

    To install tulip and its Python bindings using the quick install method, proceed as follow:

    sudo apt-add-repository ppa:tulipsoftware/ppa
    sudo apt-get update
    sudo apt-get install tulip-python

    You should then be able to import the tulip module from the Python shell.

    For manual install (meaning you has launched "make install" once Tulip compiled),
    the <tulip_install_dir> is the content of the CMake variable CMAKE_INSTALL_PREFIX
    (usually /usr/local/).
    Last thing, you were using a not updated version of the documentation and the
    installation path of the modules has slightly changed since the 3.8 version.
    It is now <tulip_install_dir>/lib/python.

    The updated documentation can be found here (also accessible from the Tulip website menus) :
    http://tulip.labri.fr/Documentation/3_8/tulip-python/html/

    Antoine

     

  • Anonymous
    2012-08-24

    thank you very much, it seems I was missing something and your apt-get commands did the trick.

     

  • Anonymous
    2012-08-24

    I spoke to soon, when I try to run this in my python shell:

    >>>from tulip import *

    I get this error message:

    Traceback (most recent call last):
      File "<pyshell#0>", line 1, in <module>
        from tulip import *
    ImportError: /usr/lib/python2.7/dist-packages/tulip.so: undefined symbol: _ZThn132_N3tlp13GraphProperty7destroyEPNS_5GraphE

    Any ideas on what's going wrong? I'm using ubuntu 11.10?

     
  • Great that it works :-)

    When installing tulip through apt-get, there is no need to
    set environment variables as tulip libs and python modules
    are installed in standard search paths.

    I will update documentation for that specific case.

    Antoine

     
  • kamal
    kamal
    2013-02-25

    hi
    i did the same thing but it still the same problem:
    Traceback (most recent call last):
      File "<pyshell#0>", line 1, in <module>
        from tulip import *
    ImportError: /usr/lib/python2.7/dist-packages/tulip.so: undefined symbol: _ZThn132_N3tlp13GraphProperty7destroyEPNS_5GraphE

    i did the changement of variable but it's still the same problem
    please ,how python can know tulip and import it without problems on what chemin exactly i change the value of variable of enverment
    thank you