install a programme downloaded as tgz file

Discussion in 'Linux' started by Winfried, Jan 16, 2009.

  1. Winfried

    Winfried

    Joined:
    Dec 25, 2008
    Messages:
    94
    Likes Received:
    0
    Location:
    Brussels
    I have downloaded a file called mnemosyne-1.2-r1.tgz; a tar file which contains a bunch of scripts all together a memory training programme. I want to install that programme on my ACO under Linux. I did not find under "How to" how to do it. I did not find it in the repository with add/remove programmes.
    I am a beginner in Linux so please provide me with instructions or advice which I may understand as former windows user. I know how to use the terminal and how to introduce line commands. However, I have never worked with a compiler if that is required.
     
    Winfried, Jan 16, 2009
    #1
  2. Winfried

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    I've just replied to someone who wants to install something else from a source tarball (which is what you have) in this post - starting several lines down! - does that give you enough to work out what to do?
     
    daldred, Jan 17, 2009
    #2
  3. Winfried

    maltloaf

    Joined:
    Dec 1, 2008
    Messages:
    57
    Likes Received:
    0
    to un-tar the file type

    tar -zxcf <filename>

    in terminal

    after that, what you do depends on how they have it set up
     
    maltloaf, Jan 18, 2009
    #3
  4. Winfried

    Winfried

    Joined:
    Dec 25, 2008
    Messages:
    94
    Likes Received:
    0
    Location:
    Brussels
    Sorry : I did what you said and I am now in a directory -which is the equivalent of MyDirectory- with the following content:

    [user@localhost mnemosyne-1.2-r1]$ ls

    about_dlg.py __init__.py mnemosyne_zh_CN.qm
    about_frm.py last_grade.py mnemosyne_zh_CN.ts
    about_frm.ui LICENSE mnemosyne_zh_HK.qm
    activate_all_categories.py main_dlg.py mnemosyne_zh_HK.ts
    activate_categories_dlg.py main_frm.py mnemosyne_zh_SG.qm
    activate_categories_frm.py main_frm.ui mnemosyne_zh_SG.ts
    activate_categories_frm.ui message_boxes.py mnemosyne_zh_TW.qm
    add_items_dlg.py mnemosyne mnemosyne_zh_TW.ts
    add_items_frm.py mnemosyne_core.py plugin.py
    add_items_frm.ui mnemosyne_cs.qm preview_item_dlg.py
    add_menu_item.py mnemosyne_cs.ts preview_item_frm.py
    always_shuffle_queue.py mnemosyne_de.qm preview_item_frm.ui
    AUTHORS mnemosyne.desktop product_tour_dlg.py
    card_prop.py mnemosyne_de.ts product_tour_frm.py
    change_category_dlg.py mnemosyne_es.qm product_tour_frm.ui
    change_category_frm.py mnemosyne_es.ts qt_cs.qm
    change_category_frm.ui mnemosyne_fa.qm qt_de.qm
    ChangeLog mnemosyne_fa.ts qt_es.qm
    clean_duplicates.py mnemosyne_fr.qm qtextedit2.py
    config_dlg.py mnemosyne_fr.ts qt_fr.qm
    config_frm.py mnemosyne_he.qm qt_he.qm
    config_frm.ui mnemosyne_he.ts qt_ja.qm
    custom_tag.py mnemosyne.icns qt_pl.qm
    edit_item_dlg.py mnemosyne_ja.qm qt_pt-br.qm
    edit_item_frm.py mnemosyne_ja.ts qt_XX.ts
    edit_item_frm.ui mnemosyne_log.py qt_zh-cn.qm
    edit_items_dlg.py mnemosyne_nb_no.qm qt_zh-tw.qm
    edit_items_frm.py mnemosyne_nb_no.ts README
    edit_items_frm.ui mnemosyne_nl.qm setup.py
    exceptions.py mnemosyne_nl.ts sound.py
    export_dlg.py mnemosyne_pl.qm statistics_dlg.py
    export_frm.py mnemosyne_pl.ts statistics_frm.py
    export_frm.ui mnemosyne.png statistics_frm.ui
    import_csv.py mnemosyne_pt_BR.qm tip_dlg.py
    import_dlg.py mnemosyne_pt_BR.ts tip_frm.py
    import_frm.py mnemosyne_XX.qm tip_frm.ui
    import_frm.ui mnemosyne_XX.ts version.py

    When I gave the command
    [user@localhost mnemosyne-1.2-r1]$ ./config
    I got:
    bash: ./config: No such file or directory

    So, it did not work

    Maybe, the compiler is not correct since it seems that some files are Python files.
    Anyway thanks for your fast reply

    Winfried
     
    Winfried, Jan 18, 2009
    #4
  5. Winfried

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    There's a file there called 'README': does that give any guidance?
     
    daldred, Jan 18, 2009
    #5
  6. Winfried

    Winfried

    Joined:
    Dec 25, 2008
    Messages:
    94
    Likes Received:
    0
    Location:
    Brussels
    Unfortuantely not; it contains this:

    This directory contains some example plugins with the main purpose of
    illustrating to plugin writers on how to achieve certain functionality.
    * activate_all_categories.py: running custom code after the database is
    loaded.
    * last_grade.py: running custom code to preprocess question and answer text
    before it is displayed.
    * add_menu_item.py: adding a menu item to the GUI.
    * import_csv.py: adding a new file format for importing.
    * custom_tag.py: intercepting a custom tag of the form <tag_name src="..">
    and run its contents in an external program.
    * always_shuffle_queue.py: always shuffle the queue, overriding the
    prioritising of the scheduled cards.
    One might wonder what the purpose is of the Plugin class, as opposed to
    running 'register_function_hook' directly. However, a later Mnemosyne version
    will allow you to activate and deactivate plugins from the GUI.
    Note that if you write plugins which require extra modules, the Windows user
    should add those to library.zip.

    At least I can not detect it.
    Winfried
     
    Winfried, Jan 18, 2009
    #6
  7. Winfried

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    Right, so you're installing mnemosyne. The website for the application has a documentation section; there you will find:

    Installation on Linux

    1. Install the following dependencies:
    * Python 2.4 or later
    * Qt 3.x and PyQt 3.x
    * PyXML
    * pygame and its dependencies
    * If you want to be able to enter formulas using latex syntax, make sure that LaTeX and dvipng are installed.
    2. Type 'python setup.py install' as root.
    3. Run the application by typing 'mnemosyne'.
     
    daldred, Jan 19, 2009
    #7
  8. Winfried

    Winfried

    Joined:
    Dec 25, 2008
    Messages:
    94
    Likes Received:
    0
    Location:
    Brussels
    Thanks daldred I will try tomorrow. It seems that I overlooked the description. Anyway I have to understand first how to apply your instructions. Maybe I have to come back. I am a beginner in Linux.
    But in any case, thanks for your speedy and precious advice
    Winfried
     
    Winfried, Jan 19, 2009
    #8
  9. Winfried

    Winfried

    Joined:
    Dec 25, 2008
    Messages:
    94
    Likes Received:
    0
    Location:
    Brussels
    <-- I found it

    * Python 2.4 or later <--I did
    * Qt 3.x and PyQt 3.x <--I did
    * PyXML <-- I did
    * pygame and its dependencies <-- I did
    * If you want to be able to enter formulas using latex syntax, make sure that LaTeX and dvipng are installed. <--no interest
    2. Type 'python setup.py install' as root. <-- I did with the following result:

    Code:
    [root@localhost mnemosyne-1.2-r1]# python setup.py install
    Traceback (most recent call last):
      File "setup.py", line 4, in <module>
        from setuptools import setup
    ImportError: No module named setuptools
    [root@localhost mnemosyne-1.2-r1]# 
    
    ????????


    Any idea what I haveto do?

    Winfried
     
    Winfried, Jan 20, 2009
    #9
  10. Winfried

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    I think you probably need to go here and get setuptools installed. I must say I'd have expected the mnemosyne website to point that out!
     
    daldred, Jan 21, 2009
    #10
  11. Winfried

    Winfried

    Joined:
    Dec 25, 2008
    Messages:
    94
    Likes Received:
    0
    Location:
    Brussels
    Thanks for this advice. So I downloaded the egg after I checked that by the dependency load I got Pythonversion 2.5.
    I executed the following and got again an error
    Code:
    [root@localhost Downloads]# sh setuptools-0.6c9-py2.5.egg
    error: invalid Python installation: unable to open /usr/lib/python2.5/config/Makefile (No such file or directory)
    
    Sorry for bothering you; could it be that the python version we get through our repository differs from the offical version?
    I checked /usr/lib/python2.5 for the folder config:
    Code:
    [root@localhost Downloads]# cd /usr/lib/python2.5
    [root@localhost python2.5]# ls
    excerpt of the listing shows
    Code:
    ......
    compiler             mutex.pyc              struct.pyo
    ConfigParser.py      mutex.pyo              subprocess.py
    ConfigParser.pyc     netrc.py               subprocess.pyc
    ConfigParser.pyo     netrc.pyc              subprocess.pyo
    contextlib.py  
    .....
    
    there is none
    Again ?????

    Winfried
     
    Winfried, Jan 21, 2009
    #11
  12. Winfried

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    Yuurrgh, this would appear to be Python's own version of dependency hell!

    I've just tried
    Code:
    sudo yum provides /usr/lib/python2.5/config/Makefile
    ..which indicates that you need to install python-devel-2.5.1-xx. The xx can be 15 or 26 - best to match it to whatever actual Python package you have installed.

    Code:
    sudo rpm -qa | grep python-2.5.1
    will tell you exactly which Python is installed.

    I wonder what it will come up with next? :)
     
    daldred, Jan 22, 2009
    #12
  13. Winfried

    Winfried

    Joined:
    Dec 25, 2008
    Messages:
    94
    Likes Received:
    0
    Location:
    Brussels
    I did so and it is
    Code:
    [user@localhost ~]$     sudo rpm -qa | grep python-2.5.1
    python-2.5.1-26.fc8.2
    [user@localhost ~]$ 
    What do I do now?

    Winfried
     
    Winfried, Jan 23, 2009
    #13
  14. Winfried

    Winfried

    Joined:
    Dec 25, 2008
    Messages:
    94
    Likes Received:
    0
    Location:
    Brussels
    I did install the setuptools as you suggested; I also asked the mnemosyne user group if they have advice since I got further errors. The last one was :
    Code:
    [root@localhost mnemosyne-1.2-r1]# python setup.py
    Traceback (most recent call last):
      File "setup.py", line 9, in <module>
        import mnemosyne.version
    ImportError: No module named mnemosyne.version
    The first lines of setup.py
    Code:
    import os, sys, shutil
    from distutils.core import Extension
    from setuptools import setup
    if sys.platform == "win32":
        import py2exe
    import mnemosyne.version
    
    From the mnemosyn people I got the message: 1. This is a Python problem and 2. I have to setup or adapt a variable called PYTHONPATH
    I also looked for the Python version which I installed
    Code:
    [root@localhost mnemosyne-1.2-r1]#     sudo rpm -qa | grep python-2.5.1
    python-2.5.1-26.fc8.2
    
    O googled around on this variable but the advice I read I don't understand.

    However, finally I got it. So no missing PYTHONPATH but a wrong unpacking method of the tar ball.
    It seems that it does not work if you unpack the tar ball without ticking the option "full path";
    Now I did that and opened a root terminal in the folder created by the unpacking and executed the command: python setup.py install. And BINGO now mnemosyne works.

    But anyway thanks for your advices with those I finally got it.
    I think we can close this case
    Winfried
     
    Winfried, Jan 23, 2009
    #14
  15. Winfried

    daldred

    Joined:
    Aug 25, 2008
    Messages:
    887
    Likes Received:
    0
    Great - glad you've finally got it working!
     
    daldred, Jan 23, 2009
    #15
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.