Python is a general-purpose programming language that emphasizes readability. Python comes pre-installed on Whatbox servers.
A list of versions currently installed on Whatbox servers can be found on the software labs page for your server.
Installing Scripts and Modules
Most Python scripts and modules are installable by using a python install command with the included setup.py file or using the pip Python package manager. By default, these methods install packages system-wide, which is not possible with your Whatbox slot. There are, however, a few methods of doing this.
pip is the defacto standard Python package manager. This is generally the least complicated method to use but can cause issues if different scripts/modules require different versions of the same dependency. pip does not come pre-installed on your Whatbox slot, but it can be installed into your user site directory (
Install pip for the version of Python you want. This installs pip into
# Python 2 curl -s https://bootstrap.pypa.io/get-pip.py | python2 - --user # Python 3 curl -s https://bootstrap.pypa.io/get-pip.py | python3 - --user
Add the user site bin directory to your PATH (if you've done this previously, you do not need to do it again).
echo "PATH=\$HOME/.local/bin:\$PATH" >> ~/.bashrc && source ~/.bashrc
Now you can install Python packages to your local library using the
--user argument to
pip install <package_name> like so:
pip install --user <package_name>.
virtualenv is a tool to create isolated Python environments to address problems with dependencies, versions, and permissions between different modules and scripts. virtualenv can be compiled from source or installed using a user site installation of pip as shown above. With your virtualenv activated, you can use the
pip install <package_name> command to install scripts and modules into that virtualenv.
More information about installing and using virtualenv can be found on its dedicated wiki page.
pipsi is a wrapper around virtualenv and pip that installs scripts (not modules). It installs packages into separate virtualenvs inside your user site directory (
~/.local) and then symlinks scripts from those packages to your user site bin directory.
Install pip into your user site directory using the User site instructions above.
Install virtualenv to your user site directory.
pip install --user virtualenv
curl -s https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python
Now you can install Python packages containing scripts to your local library using the pipsi command like so:
pipsi install <package_name>.