Installing Glade on Linux

Home Forums Installation Installing Glade on Linux

Viewing 15 posts - 1 through 15 (of 41 total)
  • Author
    Posts
  • #104
    Keith
    Keymaster

    First download the software from the downloads page – Glade 6 is the latest version.

    Unzip/untar the file to a directory and follow the README.txt instructions.

    If you see a message like ‘Could not find platform independent libraries’ this possibly means your system python installation is not as expected. Try setting the env var ‘PYTHONHOME’ to the root directory of your installation, where bin/python is. For example set it to /usr/local if your python is found at /usr/local/bin/python.

    • This topic was modified 4 years, 6 months ago by Keith.
    • This topic was modified 4 years, 1 month ago by Keith.
    • This topic was modified 4 years, 1 month ago by Keith.
    • This topic was modified 1 year, 3 months ago by Keith.
    • This topic was modified 5 months ago by Keith.
    #555
    meinteilyo
    Participant

    Does it support CentOS 5? I cant install it there, writes 'import site' failed. You may see picture in the attachment.
    Thank you
    Kind regards

    #562
    Keith
    Keymaster

    Sorry, not yet. I have only compiled and tested on CentOS 4.7

    #663
    JamesKeefer
    Participant

    I'm running glade under LSF and get a Qt error message:

    % bsub -Ip -R x64 glade
    Job <237539> is submitted to default queue <long>.
    <<Waiting for dispatch …>>
    <<Starting on xxx>>
    'import site' failed; use -v for traceback
    _IceTransSocketUNIXConnect: Cannot connect to non-local host xxx
    Qt: Session management error: Could not open network socket

    the machine from which the job submitted is and the job on which it ran have uname:
    Linux xxx 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:56:44 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

    How do I clean up the IceTransSocket issue?
    the Qt issue?
    the import site issue?

    Thanks for your help.

    #667
    Keith
    Keymaster

    The 'import site' error usually occurs if you have not got Python set up correctly – check your PYTHONDIR / PYTHONPATH.

    As to the _IceTransSocketUNIXConnect error, this has something to do with session management (try googling it). Check that you have permission to display on a remote host (xhost cmd).

    #1033
    JamesKeefer
    Participant

    I downloaded the Ubuntu 32bit version, and made this file:

    export GLADE_HOME=/…../glade4_linux32_ub10
    export PATH=$GLADE_HOME/bin:$PATH
    export LD_LIBRARY_PATH=$GLADE_HOME/lib:$LD_LIBRARY_PATH
    export PYTHONHOME=/usr/bin/python3
    export PYTHONPATH=$GLADE_HOME/bin:$PYTHONHOME
    alias python='python3'

    when I source this setup file, then try running glade, I get:

    ImportError: No module named site

    My system has both python 3.2.1rc1 and 2.6.7 installed.

    Suggestions?
    Thanks,
    Jim

    #1034
    Keith
    Keymaster

    This is all I have in my Ubunto setup:

    export GLADE_HOME=/home/keith/glade4_linux32_ub10
    export PATH=$GLADE_HOME/bin:$PATH
    export LD_LIBRARY_PATH=$GLADE_HOME/lib:$LD_LIBRARY_PATH
    export PYTHONPATH=$PYTHONPATH:$GLADE_HOME/bin
    export PYTHONHOME=/opt/ActivePython-2.7

    From the Python documentation, modules are searched according to PYTHONPATH:

    When a module named spam is imported, the interpreter searches for a
    file named spam.py in the directory containing the input script and
    then in the list of directories specified by the environment variable
    PYTHONPATH. This has the same syntax as the shell variable
    PATH, that is, a list of directory names. When PYTHONPATH
    is not set, or when the file is not found there, the search continues in an
    installation-dependent default path; on Unix, this is usually
    .:/usr/local/lib/python.

    It looks like you need to change your PYTHONPATH so Python can find the site module.
    For example, mine is at /opt/ActivePython-2.7/lib/python2.7/site.py

    #1039
    Ewald
    Participant

    Hello Glade-Supporters,

    Glade 4.1.68 (RHEL 64bit version) does not start on my openSUSE 11.3 linux OS (64bit).
    (however some older versions of Glade did)

    My start script looks as follows:

    #!/bin/bash
    pushd ${HOME}/CAD/glade/_work
    export mach_type=`uname -m`
    export GLADE_HOME="${HOME}/openSUSE/tarballs/glade4_linux64_rh4"
    export PATH=${GLADE_HOME}/bin:${PATH}
    export LD_LIBRARY_PATH=${GLADE_HOME}/lib:$LD_LIBRARY_PATH
    export PYTHONPATH=$PYTHONPATH:${GLADE_HOME}/bin
    export PYTHONHOME=/usr
    #strace glade >& glade.strace
    glade
    popd

    Error message is:

    Traceback (most recent call last):
    File "/usr/lib64/python2.6/site.py", line 519, in <module>
    main()
    File "/usr/lib64/python2.6/site.py", line 502, in main
    known_paths = addsitepackages(known_paths)
    File "/usr/lib64/python2.6/site.py", line 268, in addsitepackages
    sitedirs.append(os.path.join(prefix, sys.lib,
    AttributeError: 'module' object has no attribute 'lib'

    Python installation path is /usr/lib64/python2.6/..

    When running strace for glade, the relevant messages before aborting are:

    getcwd("/home/ewald/CAD/glade/_work", 1024) = 28
    geteuid() = 1000
    getuid() = 1000
    getegid() = 100
    getgid() = 100
    stat("/home/ewald/.local/lib/python2.7/site-packages", 0x7fffa63ad940) = -1 ENOENT (No such file or directory)
    close(4) = 0
    munmap(0x7feebde6d000, 4096) = 0
    write(2, "Traceback (most recent call last"…, 35Traceback (most recent call last):
    ) = 35
    write(2, " File "/usr/lib64/python2.6/sit"…, 61 File "/usr/lib64/python2.6/site.py", line 519, in <module>
    ) = 61
    open("/usr/lib64/python2.6/site.py", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0644, st_size=18834, …}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7feebde6d000
    read(4, """"Append module search paths fo"…, 4096) = 4096
    read(4, "nning in the build dirn (espe"…, 4096) = 4096
    read(4, "nv_base else joinuser("~", ".loc"…, 4096) = 4096
    read(4, " fp = file(filename"…, 4096) = 4096
    read(4, " passnnndef main():n glo"…, 4096) = 2450
    write(2, " ", 4 ) = 4
    write(2, "main()n", 7main()
    ) = 7
    close(4) = 0
    munmap(0x7feebde6d000, 4096) = 0
    write(2, " File "/usr/lib64/python2.6/sit"…, 57 File "/usr/lib64/python2.6/site.py", line 502, in main
    ) = 57
    open("/usr/lib64/python2.6/site.py", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0644, st_size=18834, …}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7feebde6d000
    read(4, """"Append module search paths fo"…, 4096) = 4096
    read(4, "nning in the build dirn (espe"…, 4096) = 4096
    read(4, "nv_base else joinuser("~", ".loc"…, 4096) = 4096
    read(4, " fp = file(filename"…, 4096) = 4096
    read(4, " passnnndef main():n glo"…, 4096) = 2450
    write(2, " ", 4 ) = 4
    write(2, "known_paths = addsitepackages(kn"…, 43known_paths = addsitepackages(known_paths)
    ) = 43
    close(4) = 0
    munmap(0x7feebde6d000, 4096) = 0
    write(2, " File "/usr/lib64/python2.6/sit"…, 68 File "/usr/lib64/python2.6/site.py", line 268, in addsitepackages
    ) = 68
    open("/usr/lib64/python2.6/site.py", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0644, st_size=18834, …}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7feebde6d000
    read(4, """"Append module search paths fo"…, 4096) = 4096
    read(4, "nning in the build dirn (espe"…, 4096) = 4096
    read(4, "nv_base else joinuser("~", ".loc"…, 4096) = 4096
    write(2, " ", 4 ) = 4
    write(2, "sitedirs.append(os.path.join(pre"…, 46sitedirs.append(os.path.join(prefix, sys.lib,
    ) = 46
    close(4) = 0
    munmap(0x7feebde6d000, 4096) = 0
    write(2, "AttributeError", 14AttributeError) = 14
    write(2, ": ", 2: ) = 2
    write(2, "'module' object has no attribute"…, 38'module' object has no attribute 'lib') = 38
    write(2, "n", 1
    ) = 1
    rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7feebc3e42e0}, {0x943e60, [], SA_RESTORER, 0x7feebc3e42e0}, 8) = 0
    brk(0xe85000) = 0xe85000
    getpid() = 31839
    munmap(0x7feebde6f000, 233472) = 0
    exit_group(1) = ?

    The traceback starts after

    stat("/home/ewald/.local/lib/python2.7/site-packages", 0x7fffa63ad940) = -1 ENOENT (No such file or directory)

    close(4) = 0

    munmap(0x7feebde6d000, 4096) = 0

    write(2, "Traceback (most recent call last"…, 35Traceback (most recent call last):

    Python 2.7 is NOT installed on my OS.

    Can you help, please?

    Thanks.

    Best regards,

    Ewald

    #1040
    Keith
    Keymaster

    If you've not got the current ActiveState Python installed on your machine, don't set PYTHONHOME.

    On CentOS 4.x if I set this to /usr, I get the similar error 'ImportError: No module named site'.

    If PYTHONHOME is not specified, then Glade should start up OK.

    #1041
    Ewald
    Participant

    Thanks.

    Glade still fails to start when not setting PYTHONHOME:

    #!/bin/bash
    pushd ${HOME}/CAD/glade/_work
    export mach_type=`uname -m`
    export GLADE_HOME="${HOME}/openSUSE/tarballs/glade4_linux64_rh4"
    export PATH=${GLADE_HOME}/bin:${PATH}
    export LD_LIBRARY_PATH=${GLADE_HOME}/lib:$LD_LIBRARY_PATH
    export PYTHONPATH=$PYTHONPATH:${GLADE_HOME}/bin
    #export PYTHONHOME=/usr
    #strace glade >& glade.strace
    glade
    popd

    Could not find platform independent libraries <prefix>
    Could not find platform dependent libraries <exec_prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    Traceback (most recent call last):
    File "/usr/lib64/python2.6/site.py", line 519, in <module>
    main()
    File "/usr/lib64/python2.6/site.py", line 502, in main
    known_paths = addsitepackages(known_paths)
    File "/usr/lib64/python2.6/site.py", line 268, in addsitepackages
    sitedirs.append(os.path.join(prefix, sys.lib,
    AttributeError: 'module' object has no attribute 'lib'

    #1042
    Keith
    Keymaster

    It would seem that it's still finding the system /usr/lib64/python2.6 stuff.

    Can you do a printenv | grep PYTHON and see if anything is getting set elsewhere?

    The alternative is to install the activestate python 2.7 and set pythonhome to point to that.

    #1043
    Keith
    Keymaster

    I just checked on Ubunto 10.4 and the behaviour is as you describe if PYTHONHOME is not set.

    Glade is currently statically linked to version 2.7 of python. So you need to make sure you have the same version on your system. If there's a way round it checking for the site packages it would be helpful, I'll see if there is.

    #1044
    Keith
    Keymaster

    I've rebuilt the linux builds of Glade to use Python 2.6. Please try the versions (same build ID, 4.1.68) on the website and see if this helps.

    #1045
    Ewald
    Participant

    Hello,

    Thanks a lot. Glade 4.1.69 RHEL / 64 bit works perfect with openSUSE 11.3 / python 2.6 now.

    Good job!

    BR,

    Ewald

    p, li { white-space: pre-wrap; }

    # Glade release version 4.1.69 compiled on Oct 14 2011 11:28:54
    # Qt version 4.7.3 on 64 bit platform (little endian)
    # Compiled with gcc version 3.4
    # Username: ewald Hostname: abc/def
    # Current time: Fri Oct 14 18:35:22 2011
    # Operating system: Linux abc/def 2.6.34.10-0.2-default #1 SMP 2011-07-20 18:48:56 +0200 x86_64 x86_64 x86_64 GNU/Linux
    # Number of CPUs: 2
    # OpenGL vendor: NVIDIA Corporation
    # OpenGL renderer: GeForce 8400M GS/PCI/SSE2
    # OpenGL version: 3.3.0 NVIDIA 275.21
    # OpenGL FBOs will be used.
    # Python version 2.6.7 (r267:88850, Jun 27 2011, 05:04:01)
    [GCC 4.0.2 20051125 (Red Hat 4.0.2-8)] for linux2
    >>>
    #1046
    Keith
    Keymaster

    Thanks for reporting the problem, Ewald. Looks like something was broken in the ActiveState Python 2.7 release.

Viewing 15 posts - 1 through 15 (of 41 total)
  • You must be logged in to reply to this topic.