Just Host Web Hosting Help
Install Python 2.7 to your account
- Overview
- Download up to the latest Python version 3.9.2
- Python Installation
- Modify the .bashrc
- Configuration Error
Overview
Just Host uses the preinstalled version of Python that ships with CentOS. Because of this, it is often not the latest release. This article will explain how to install an updated version of Python locally.
Note: In order to install Python locally, you will need to be added to the Compiler group. Please contact our Support at 888-755-7585 (ext. 2) to request you be added to the Compiler group before proceeding.
Download up to the latest Python version 3.9.2
Enter the following commands to download and extract Python 3.9.2 to your hosting account. You can also use this reference Index of Python.org/ftp/ to get your preferred version.
mkdir ~/python
cd ~/python
wget http://www.python.org/ftp/python/3.9.2/Python-3.9.2.tgz
tar zxfv Python-3.9.2.tgz
find ~/python -type d | xargs chmod 0755
cd Python-3.9.2
Python Installation
Once extracted, you can use the following commands to configure and install Python.
./configure --prefix=$HOME/python
make
make install
Modify the .bashrc
For your local version of python to load, you will need to add it to the .bashrc file.
vim ~/.bashrc
Press iEnter:
export PATH=$HOME/python/Python-3.9.2/:$PATH
Write the changes (press ESC
) and close vim:
:wq
Press Enter
source ~/.bashrc
Note: You may need to log out for the environment to update.
Enter python -V to check the version of python installed.
Configuration Error
configure: error: in `/home2/tomstec2/Python_3.9.2/Python-3.9.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Important Note: If this configuration error occurs when you attempt to configure python with ./configure --prefix=$HOME/python, this means that your cPanel user is not added to the C compiler group on the server.