Loading...

Knowledge Base
Hosting Ad
 Up to 70% off  on  WordPress  hosting for WordPress Websites and Stores!
Categories:

How to Install Python on a Hosting Server

Share

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?

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:

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 at 888-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.

If you need further assistance, feel free to contact us via Chat or Phone:

  • Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
  • Phone Support -
    • US: 888-401-4678
    • International: +1 801-765-9400

You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.

Did you find this article helpful?

 
* Your feedback is too short

Loading...