Skip to content

Advanced Installation Guide

The Duskfall Portal Crew edited this page May 7, 2025 · 1 revision

Advanced Installation Guide

This guide provides more detailed and platform-specific instructions for installing the Hugging Face Backup Tool. It supplements the basic installation steps outlined in the main documentation. This guide covers a wider range of Linux distributions and provides troubleshooting tips.

Table of Contents

  1. Prerequisites
  2. Installation on Linux
  3. Installation on Windows
  4. Installation on macOS
  5. Running the Application

1. Prerequisites

Before you begin, ensure you've met the general prerequisites from the main documentation:

  • Python 3.10 or higher:

  • Git (For cloning the repository - usually pre-installed, but check your distribution).

    Note: If you don't have git, install it using your distribution's package manager (e.g., sudo apt install git on Debian/Ubuntu, sudo dnf install git on Fedora/CentOS/RHEL).

2. Installation on Linux

This section covers installing on various Linux distributions, including both modern and older versions.

2.1. Debian/Ubuntu (and Derivatives)

  1. Update Package Lists:

    sudo apt update
  2. Install Python and Pip:

    sudo apt install python3 python3-pip python3-venv

    Troubleshooting:

    • Older Debian/Ubuntu Versions: On older versions (e.g., Ubuntu 18.04, Debian 9/10), the default Python 3 might be older than 3.10. You may need to install a more recent Python version manually or use a tool like pyenv to manage multiple Python versions (see section 3.5).
  3. Clone the Repository: (See main documentation)

    git clone [YOUR_REPOSITORY_URL]
    cd [YOUR_REPOSITORY_DIRECTORY]
  4. Create and Activate the Virtual Environment: (See main documentation)

    python3 -m venv .venv
    source .venv/bin/activate
  5. Install Dependencies:

    pip install -r requirements.txt

    Troubleshooting:

    • Permissions Issues: If you encounter "permission denied" errors during dependency installation, try running the pip install command with the --user flag (e.g., pip install --user -r requirements.txt).
    • Missing Packages: If some packages are not found, it could indicate your default repositories don't include them. Try updating repositories or adding extra ones that might have a larger list of pre-built packages.

2.2. Fedora/CentOS/RHEL (and Derivatives)

  1. Update Package Lists:

    sudo dnf update  # Or yum update on older systems
  2. Install Python and Pip:

    sudo dnf install python3 python3-pip python3-venv  # Or yum install...

    Troubleshooting:

    • Older Fedora/CentOS/RHEL Versions: The default Python version might be older. Consider using pyenv to manage multiple Python versions (see section 3.5).
    • EPEL Repository: On older CentOS/RHEL systems, you might need to enable the EPEL (Extra Packages for Enterprise Linux) repository, which provides a wider range of packages.
    ```bash
    sudo dnf install epel-release  # On Fedora/CentOS/RHEL 8+
    # On older versions, the procedure may vary; see the EPEL documentation.
    ```
    
  3. Clone the Repository: (See main documentation)

    git clone [YOUR_REPOSITORY_URL]
    cd [YOUR_REPOSITORY_DIRECTORY]
  4. Create and Activate the Virtual Environment: (See main documentation)

    python3 -m venv .venv
    source .venv/bin/activate
  5. Install Dependencies:

    pip install -r requirements.txt

2.3. Arch Linux (and Derivatives)

  1. Update Package Lists:

    sudo pacman -Syu
  2. Install Python and Pip:

    sudo pacman -S python python-pip python-virtualenv
  3. Clone the Repository: (See main documentation)

    git clone [YOUR_REPOSITORY_URL]
    cd [YOUR_REPOSITORY_DIRECTORY]
  4. Create and Activate the Virtual Environment: (See main documentation)

    python3 -m venv .venv
    source .venv/bin/activate
  5. Install Dependencies:

    pip install -r requirements.txt

    Troubleshooting:

    • AUR Packages: If a dependency is not available in the official Arch repositories, you might need to install it from the Arch User Repository (AUR). You can use a helper like yay or paru.

2.4. OpenSUSE

  1. Update Package Lists:

    sudo zypper refresh
  2. Install Python and Pip:

    sudo zypper install python3 python3-pip python3-venv
  3. Clone the Repository: (See main documentation)

    git clone [YOUR_REPOSITORY_URL]
    cd [YOUR_REPOSITORY_DIRECTORY]
  4. Create and Activate the Virtual Environment: (See main documentation)

    python3 -m venv .venv
    source .venv/bin/activate
  5. Install Dependencies:

    pip install -r requirements.txt

2.5. Alternative Python Version Management (pyenv)

If you need to use a specific Python version (e.g., Python 3.11) or manage multiple Python versions on your system, consider using pyenv. pyenv allows you to easily install and switch between different Python versions without affecting the system Python.

  1. Install pyenv:

    # Method varies by system; see pyenv's documentation for details.
    # Example for Debian/Ubuntu:
    sudo apt update
    sudo apt install pyenv
  2. Install the Desired Python Version:

    pyenv install 3.11.x  # Replace 3.11.x with the version you need
  3. Set the Python Version for Your Project:

    pyenv local 3.11.x  # Creates a .python-version file in your project directory

    Note: The .python-version file will specify the Python version to use within your project directory.

  4. Clone the Repository: (See main documentation)

    git clone [YOUR_REPOSITORY_URL]
    cd [YOUR_REPOSITORY_DIRECTORY]
  5. Create and Activate the Virtual Environment: (See main documentation)

    python3 -m venv .venv
    source .venv/bin/activate
  6. Install Dependencies:

    pip install -r requirements.txt

3. Installation on Windows

This section covers installing the tool on Windows.

  1. Install Python: Download the latest Python 3.10+ installer from the official Python website (https://www.python.org/downloads/).

    • Important: During installation, check the box that says "Add Python to PATH." This is crucial for running Python commands from the command prompt.
  2. Clone the Repository:

    • Open the Command Prompt or PowerShell.

    • Navigate to the directory where you want to store the project.

    • Run:

      git clone [YOUR_REPOSITORY_URL]
      cd [YOUR_REPOSITORY_DIRECTORY]

      Replace [YOUR_REPOSITORY_URL] and [YOUR_REPOSITORY_DIRECTORY] with the appropriate values.

  3. Create and Activate the Virtual Environment:

    python -m venv .venv
    .venv\Scripts\activate
  4. Install Dependencies:

    pip install -r requirements.txt

    Troubleshooting:

    • "pip" is not recognized: If you get this error, the "Add Python to PATH" option during installation was not selected, or there's a problem with your PATH environment variable. Reinstall Python and make sure you check that box.
    • Permissions: You might need to run the Command Prompt or PowerShell as an administrator (right-click and select "Run as administrator") if you have issues installing dependencies.

4. Installation on macOS

  1. Install Python: You can install Python from the official website.

    • Alternatively, you can use a package manager like Homebrew:

      brew install python@3.10

      Note: Using Homebrew provides a more controlled and isolated Python environment, but you will need to install Homebrew first if you don't have it.

  2. Clone the Repository:

    • Open the Terminal.

    • Navigate to the directory where you want to store the project.

    • Run:

      git clone [YOUR_REPOSITORY_URL]
      cd [YOUR_REPOSITORY_DIRECTORY]

      Replace [YOUR_REPOSITORY_URL] and [YOUR_REPOSITORY_DIRECTORY] with the appropriate values.

  3. Create and Activate the Virtual Environment:

    python3 -m venv .venv
    source .venv/bin/activate
  4. Install Dependencies:

    pip install -r requirements.txt

    Troubleshooting:

    • Homebrew Issues: If you're using Homebrew and run into problems, try updating Homebrew: brew update.
    • Permissions: Occasionally, you may encounter permissions issues. You can try using sudo (e.g., sudo pip install ...) but try to avoid it if possible.

5. Running the Application

After completing the installation steps, you can run the application using the command:

python hf_backup_tool/main.py