Skip to main content

How to Install Python on a Hosting Server

Python is a versatile and user-friendly programming language widely used by developers and professionals for its adaptability. In this guide, we'll explain how to install Python on a hosting server.


  • What are the Requirements for Running Python on a Hosting Server?
  • Can I Install Python on Bluehost?
  • Step-by-step Guide to Install Python 3.9 on Bluehost
  • Python Download
  • Python Installation
  • Modify the .bashrc
  • Python Installation Error
  • Summary

What are the Requirements for Running Python on a Hosting Server?

To execute a Python application on a hosting server, you'll need the right hosting environment. Bluehost offers a range of options suitable for Python development, including VPS, dedicated servers, and various shared hosting plans.

Can I Install Python on Bluehost?

Yes. Bluehost Python Installation is preinstalled and shipped with CentOS. Because of this, it is often not the latest release. To install Python locally, you will need to be added to the Compiler group. Please contact our Support at 888-401-4678 to request you be added to the Compiler group before proceeding.

Step-by-step Guide to Install Python 3.9 on Bluehost

Python Download

In the example below, we will be installing Python 3.9.2. Enter the following commands to download and extract Python 3.9.2 to your hosting account. Note :

  • See Index of Python.org/ftp/ to get your preferred Python version.
  • Check out Status of Python Versions for more details about the latest Python version and the end-of-life of previous versions.
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 i , then enter:

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.

Python Installation 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

If the configuration error shown above 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. Contact our Support at888-401-4678 to request you be added to the Compiler group.

Summary

This guide includes instructions on how to download and install Python. To enhance your code's performance and compatibility, it is recommended that you install the latest version of Python. Prior to installation, please get in touch with the support team to be added to the Compiler group to prevent any configuration errors.