<\/span><\/h2>\n\n\n\nTo install Python3, first, we will use some Python3 dependencies with the following command:<\/p>\n\n\n\n
yum install wget yum-utils make gcc openssl-devel bzip2-devel libffi-devel zlib-devel sqlite-devel -y<\/pre>\n\n\n\nOnce the Python3 dependencies are installed, update the system and download Python3<\/p>\n\n\n\n
yum update\n\nwget https:\/\/www.python.org\/ftp\/python\/3.10.5\/Python-3.10.5.tgz\n<\/pre>\n\n\n\nExtract the Python3 file by using the below command:<\/p>\n\n\n\n
tar xzf Python-3.10.5.tgz \n\ncd Python-3.10.5\n<\/pre>\n\n\n\nInstall Python3 with the following command:<\/p>\n\n\n\n
.\/configure\n\nmake altinstall\n<\/pre>\n\n\n\nOnce installed, check the python version:<\/p>\n\n\n\n
python3 --version<\/pre>\n\n\n\nYou should receive the following output:<\/p>\n\n\n\n
[root@host Python-3.10.5]# python3.10 --version\nPython 3.10.5\n<\/pre>\n\n\n\n<\/span>Step 3. Create Python Virtual Environment<\/span><\/h2>\n\n\n\nTo create the Python virtual environment and activate it execute the following commands:<\/p>\n\n\n\n
cd \/home\/\n\npython3 -m venv django-venv\n\nsource django-venv\/bin\/activate\n<\/pre>\n\n\n\n<\/span>Step 4. Install Django Web Framework<\/span><\/h2>\n\n\n\nNow, when the Django virtual environment is created and activated, we can proceed with installing the Django Web Framework:<\/p>\n\n\n\n
pip3 install django<\/pre>\n\n\n\nAfter successful installation, you should see the following output:<\/p>\n\n\n\n
(django-venv) [root@host home]# pip3 install django\nCollecting django\n Downloading Django-4.1.7-py3-none-any.whl (8.1 MB)\n \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 8.1\/8.1 MB 5.1 MB\/s eta 0:00:00\nCollecting asgiref<4,>=3.5.2\n Downloading asgiref-3.6.0-py3-none-any.whl (23 kB)\nCollecting sqlparse>=0.2.2\n Downloading sqlparse-0.4.3-py3-none-any.whl (42 kB)\n \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 42.8\/42.8 KB 5.7 MB\/s eta 0:00:00\nInstalling collected packages: sqlparse, asgiref, django\nSuccessfully installed asgiref-3.6.0 django-4.1.7 sqlparse-0.4.\n<\/pre>\n\n\n\n