How to Install Python on HostMonster

On HostMonster webservers, the Python scripting language is automatically installed, but the installation does not include every Python module. Therefore, if you want to install additional Python modules, you can do so. Install the Python module from the command line, logged in via the secure shell (SSH). Logging in via the secure shell gives you command line access, as if you were on the computer itself.

Instructions

    • 1

      Log in to your server via the secure shell.

    • 2

      Type "vi .bashrc" and press "Enter." This opens up a bash file in the vi editor. Check that the following lines of code are in the file, and if they aren't, add them:

      export PYTHONPATH=$HOME/.local/lib/python/site-packages:$PYTHONPATH

      export PYTHONPATH=$HOME/.local/lib/python2.4/site-packages:$PYTHONPATH

      export PATH=$HOME/.local/bin:$PATH

    • 3

      Press "Esc," then ":x" to exit and save from vi.

    • 4

      Type "wget URL" -- replacing URL with the long URL of the Python module you want to install. Press "Enter." Type "tar xzvf FILENAME" -- replacing FILENAME with the filename of the module. Press "Enter."

    • 5

      Type "cd FILENAME" and press "Enter." Type "python filename.py build" and press "Enter." Then type "sudo python filename.py install" and press "Enter." Enter your root username, and press "Enter."

Related Searches:

References

Comments

Related Ads

Featured