sushmoyhossain
Posts: 1
Joined: Wed Dec 06, 2017 9:55 pm

Install Tar file??

Wed Dec 06, 2017 10:05 pm

Hey Guys!
I'm completely new to Linux... I downloaded Python-3.6.3.tar.xz file but i'm unable to instal it!
please Help me...

User avatar
kyrios
Posts: 1862
Joined: Thu Sep 22, 2016 4:20 pm

Re: Install Tar file??

Wed Dec 06, 2017 10:22 pm

sushmoyhossain wrote:
Wed Dec 06, 2017 10:05 pm
Hey Guys!
I'm completely new to Linux... I downloaded Python-3.6.3.tar.xz file but i'm unable to instal it!
please Help me...
FWIW, Python 3.6 should be available on Solus in a few weeks.

alkenes
Posts: 1
Joined: Tue Dec 12, 2017 11:37 pm

Re: Install Tar file??

Wed Dec 13, 2017 12:44 am

Alright so even though Python 3.6 is gonna be in the repos soon it's good to know how to install from source.

Open up a command prompt and move into where ever you have your python tarball.

Code: Select all

cd ~/Downloads

Notes: (You said you're new so I'm gonna explain everything like you have no idea what I'm talking about.)
cd = change directory, this moves you around in the terminal.
~ is a shortcut for your home directory so ~/Downloads would be the same as /home/sushmoyhossain/Downloads.


Now we need to extract the tarball.

Code: Select all

tar xf Python-3.6.3.tar.xz
Notes: Adding the x after tar tells it we want to extract, adding the f tells it that the next arg is the file to use.

Ok so now there should be a new folder called Python-3.6.3. Before we can start building it we need to make sure we have all the tools we need. The following command should get everything that you need to compile and build software.

Code: Select all

sudo eopkg install -c system.devel
Now that we have tools we can try to start building.
First move into the python folder.

Code: Select all

cd Python-3.6.3
Now we're going to run the configuration script.

Code: Select all

./configure
Note: The above command is how you run a script in the folder you are in. A period `.` is a short cut for the folder that you are currently in. The name of the script is configure.

That should have spewed out a bunch of lines of text that look something like checking for something... yes. If there are any errors you probable are missing a package. If you can figure out what package is missing you can try:

Code: Select all

sudo eopkg it <missingPackage>-devel
That will install the stuff that's needed for building with that package. If you need some help post the error in here.

Next we can compile.

Code: Select all

make
There should be another wall of text and this may take a while. When it's done we're ready to install.

Code: Select all

sudo make install
After that runs you should be good. Check that it's installed.

Code: Select all

/usr/local/bin/python3.6 --version
You may want to aid an alias from python3 to this.

User avatar
Justin
Development Team
Posts: 3613
Joined: Mon Jul 28, 2014 10:42 am
Location: Adelaide, Australia
Contact: Website Google+ Twitter

Re: Install Tar file??

Sun Dec 17, 2017 8:08 am

Please make sure if installing python that it is SEPARATE from your main install i.e in /usr/local as eopkg (the Solus pakcage manager) is python based and you can break a lot if not done correctly.

Return to “Tutorials”