|
|
@@ -10,17 +10,17 @@ Ubuntu 24.04 does not include Python 2.7 by default, as it has reached its end o
|
|
|
```
|
|
|
2. **Install required dependencies:**
|
|
|
```bash
|
|
|
- sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libsqlite3-dev libffi-dev
|
|
|
+ sudo apt install -y build-essential zlib1g-dev checkinstall libncurses5-dev libncurses-dev libnss3-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev libreadline-dev libdb-dev
|
|
|
```
|
|
|
-3. **Download Python 2.7.3 source code:**
|
|
|
+3. **Download Python 2.7.18 source code:**
|
|
|
```bash
|
|
|
cd /usr/src
|
|
|
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
|
|
|
```
|
|
|
4. **Extract the downloaded file:**
|
|
|
```bash
|
|
|
- tar -xzf Python-2.7.3.tgz
|
|
|
- cd Python-2.7.3
|
|
|
+ tar xzf Python-2.7.18.tgz
|
|
|
+ cd Python-2.7.18
|
|
|
```
|
|
|
5. **Configure and compile Python 2.7:**
|
|
|
When configuring the build, you have two options for the compilation:
|
|
|
@@ -53,25 +53,11 @@ Ubuntu 24.04 does not include Python 2.7 by default, as it has reached its end o
|
|
|
Python 2.7.18
|
|
|
```
|
|
|
|
|
|
-7. **Adding Python 2.7 to PATH:**
|
|
|
-
|
|
|
- To use the `python2.7` command without typing the full path every time:
|
|
|
-
|
|
|
- ```bash
|
|
|
- echo 'export PATH="/usr/local/python2.7/bin:$PATH"' >> ~/.bashrc
|
|
|
- source ~/.bashrc
|
|
|
- ```
|
|
|
-
|
|
|
- **Verify:**
|
|
|
- ```bash
|
|
|
- python2.7 -V
|
|
|
- ```
|
|
|
-
|
|
|
## Installing `pip` for Python 2.7
|
|
|
|
|
|
1. **Install `curl` if not installed:**
|
|
|
```bash
|
|
|
- sudo apt install curl -y
|
|
|
+ sudo apt install curl
|
|
|
```
|
|
|
2. **Download the `get-pip.py` script:**
|
|
|
```bash
|