How To Set Up Python 2.7.6 and 3.3.3 on CentOS 6.4
How To Set Up Python 2.7.6 and 3.3.3 on CentOS 6.4
If you're using CentOS 6.4 and need to install Python 2.7.6 or 3.3.3, follow these simple steps:
Step 1: Update the System
Before starting, it's recommended to update your system to the latest version.
sudo yum update
Step 2: Install Development Tools
You'll need to install the development tools required to compile Python from source.
sudo yum groupinstall "Development Tools"
Step 3: Download Python Source Code
Download the source code for the version of Python you want to install. For Python 2.7.6:
wget https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
For Python 3.3.3:
wget https://www.python.org/ftp/python/3.3.3/Python-3.3.3.tgz
Step 4: Extract the Source Code
Extract the downloaded source code.
tar xzf Python-2.7.6.tgz
or
tar xzf Python-3.3.3.tgz
Step 5: Configure the Build
Change to the directory where you extracted the source code and run the configure script.
cd Python-2.7.6
./configure --prefix=/usr/local
or
cd Python-3.3.3
./configure --prefix=/usr/local
Step 6: Build and Install Python
Compile and install Python.
make && sudo make altinstall
Step 7: Verify the Installation
Check that Python has been installed correctly.
python2.7 --version
or
python3.3 --version
That's it! You've successfully installed Python 2.7.6 or 3.3.3 on CentOS 6.4.
Keywords: Python, CentOS, setup, tutorial, 2.7.6, 3.3.3, development tools, source code, configure, installation.
Комментарии
Отправить комментарий