LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing a tar.bz2 archive with Python (https://www.linuxquestions.org/questions/linux-newbie-8/installing-a-tar-bz2-archive-with-python-572456/)

Shadow ZERO 07-26-2007 11:05 AM

Installing a tar.bz2 archive with Python
 
Total Linux noob here, with a total noob question. I'm trying to install a P2P file sharing program called Nicotine, compressed in the tar.bz2 format. The install readme reads as follows:

_____________________________________________________________________________________________
To install Nicotine, from the source tree run:

python setup.py install --prefix=<dir>

If you omit --prefix Nicotine will be installed into the python system
directory (typically /usr)

This is not recommended however, as there is no way to uninstall things
easily this way.


The recommended way of running Nicotine is from the source tree, which might
seem strange, but is no problem at all, especially if you are the only user of
the system that is interested in running Nicotine. From the source tree run:

python ./nicotine
____________________________________________________________________________________________

After spending hours searching Google and Linux forums for every combination of the terms "python" "install" "source tree" and "tar.bz2", i can't find the answer to some simple questions.

How do i open the command console so that i can use the command "python setup.py install --prefix=<dir>" from the "source tree"? And what does it mean by "source tree"? Is that the Linux term for a "root directory" in DOS or Windows? Also, when it talks about the "recommended" way of running it, I notice he is still talking about using the python command from the source tree - is this after completing the previous installion step, or does this talking about running it from the archive?

I'm using Mint, a variation of Ubuntu, if my distro matters... and it comes with python 2.5.

leomburke 07-26-2007 11:38 AM

Quote:

Originally Posted by Shadow ZERO
Total Linux noob here, with a total noob question. I'm trying to install a P2P file sharing program called Nicotine, compressed in the tar.bz2 format. The install readme reads as follows:

_____________________________________________________________________________________________
To install Nicotine, from the source tree run:

python setup.py install --prefix=<dir>

If you omit --prefix Nicotine will be installed into the python system
directory (typically /usr)

This is not recommended however, as there is no way to uninstall things
easily this way.


The recommended way of running Nicotine is from the source tree, which might
seem strange, but is no problem at all, especially if you are the only user of
the system that is interested in running Nicotine. From the source tree run:

python ./nicotine
____________________________________________________________________________________________

After spending hours searching Google and Linux forums for every combination of the terms "python" "install" "source tree" and "tar.bz2", i can't find the answer to some simple questions.

How do i open the command console so that i can use the command "python setup.py install --prefix=<dir>" from the "source tree"? And what does it mean by "source tree"? Is that the Linux term for a "root directory" in DOS or Windows? Also, when it talks about the "recommended" way of running it, I notice he is still talking about using the python command from the source tree - is this after completing the previous installion step, or does this talking about running it from the archive?

I'm using Mint, a variation of Ubuntu, if my distro matters... and it comes with python 2.5.

OK - i think there are several points to be made here:
1) if you are completely new to Linux then I would suggest using the built in package manager to install your software - Ubuntu has a huge library of software and i am sure you will find what you are looking for in there (I would assume that Aptitude is available in Mint). If you really want to install your P2P program yourself then read on.

2) you first need to find a "terminal" (the command console in Linux - the equivalent of clicking start-->run-->cmd in windows XP). In Gnome this can be found either in the application menu or the system tools menu from the main Applications menu at the top of your screen.

3) once you here you need to CD to the location of the bz2 file:
cd /path/to/move/to
remember that Linux paths are CaSe-SeNsITiVe

4) you then need to unpack your app:
tar xvfj {app-name}.tar.bz2
This will "unzip" (urgh) the compressed file into a new folder called {app_version} - just run 'ls' to see what the folder is called and then 'cd' into it.
5) if you 'ls' in this folder then you should either see a folder called 'src' or a file called setup.py - if it is the latter then follow the instructions you have pasted otherwise you will need to cd into the src directory to find the setup file.

I would strongly suggest that you go via the first route if you are very new to Linux and don't want to spend the bulk of your time in this world finding deps and resolving problems - when you have some more experience then you will be able to install software from source code without thinking about it :).

Leom

pixellany 07-26-2007 12:24 PM

After extacting the archive, look to see if it contains of .py or .pyc files. If so, I think you can simply run the program by calling the appropriate file.

going past the INSTALL instructions, what does the documentation say about how to actually run the program?


All times are GMT -5. The time now is 09:12 PM.