-
-
Notifications
You must be signed in to change notification settings - Fork 0
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.
- Prerequisites
- Installation on Linux
- Installation on Windows
- Installation on macOS
- Running the Application
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 giton Debian/Ubuntu,sudo dnf install giton Fedora/CentOS/RHEL).
This section covers installing on various Linux distributions, including both modern and older versions.
-
Update Package Lists:
sudo apt update
-
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
pyenvto manage multiple Python versions (see section 3.5).
-
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
-
Clone the Repository: (See main documentation)
git clone [YOUR_REPOSITORY_URL] cd [YOUR_REPOSITORY_DIRECTORY] -
Create and Activate the Virtual Environment: (See main documentation)
python3 -m venv .venv source .venv/bin/activate -
Install Dependencies:
pip install -r requirements.txt
Troubleshooting:
-
Permissions Issues: If you encounter "permission denied" errors during dependency installation, try running the
pip installcommand with the--userflag (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.
-
Permissions Issues: If you encounter "permission denied" errors during dependency installation, try running the
-
Update Package Lists:
sudo dnf update # Or yum update on older systems -
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
pyenvto 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. ``` -
Older Fedora/CentOS/RHEL Versions: The default Python version might be older. Consider using
-
Clone the Repository: (See main documentation)
git clone [YOUR_REPOSITORY_URL] cd [YOUR_REPOSITORY_DIRECTORY] -
Create and Activate the Virtual Environment: (See main documentation)
python3 -m venv .venv source .venv/bin/activate -
Install Dependencies:
pip install -r requirements.txt
-
Update Package Lists:
sudo pacman -Syu
-
Install Python and Pip:
sudo pacman -S python python-pip python-virtualenv
-
Clone the Repository: (See main documentation)
git clone [YOUR_REPOSITORY_URL] cd [YOUR_REPOSITORY_DIRECTORY] -
Create and Activate the Virtual Environment: (See main documentation)
python3 -m venv .venv source .venv/bin/activate -
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
yayorparu.
-
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
-
Update Package Lists:
sudo zypper refresh
-
Install Python and Pip:
sudo zypper install python3 python3-pip python3-venv
-
Clone the Repository: (See main documentation)
git clone [YOUR_REPOSITORY_URL] cd [YOUR_REPOSITORY_DIRECTORY] -
Create and Activate the Virtual Environment: (See main documentation)
python3 -m venv .venv source .venv/bin/activate -
Install Dependencies:
pip install -r requirements.txt
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.pyenvallows you to easily install and switch between different Python versions without affecting the system Python.
-
Install pyenv:
# Method varies by system; see pyenv's documentation for details. # Example for Debian/Ubuntu: sudo apt update sudo apt install pyenv
-
Install the Desired Python Version:
pyenv install 3.11.x # Replace 3.11.x with the version you need -
Set the Python Version for Your Project:
pyenv local 3.11.x # Creates a .python-version file in your project directory
Note: The
.python-versionfile will specify the Python version to use within your project directory. -
Clone the Repository: (See main documentation)
git clone [YOUR_REPOSITORY_URL] cd [YOUR_REPOSITORY_DIRECTORY] -
Create and Activate the Virtual Environment: (See main documentation)
python3 -m venv .venv source .venv/bin/activate -
Install Dependencies:
pip install -r requirements.txt
This section covers installing the tool on Windows.
-
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.
-
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.
-
-
Create and Activate the Virtual Environment:
python -m venv .venv .venv\Scripts\activate
-
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.
-
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.
-
-
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.
-
-
Create and Activate the Virtual Environment:
python3 -m venv .venv source .venv/bin/activate -
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.
-
Homebrew Issues: If you're using Homebrew and run into problems, try updating Homebrew:
After completing the installation steps, you can run the application using the command:
python hf_backup_tool/main.py