Let's get de3u running on your Linux Mint 22 system. Since you've used it on Windows, you're already familiar with the basic functionality, so we'll focus on the Linux installation and setup.
Here's a comprehensive guide:
1. Install Python:
Linux Mint typically comes with Python 3 pre-installed. Verify this by opening a terminal and typing:
bash
python3 --version
If you don't have Python 3, install it using the package manager:
bash
sudo apt update
sudo apt install python3
2. Install pip:
pip is the package installer for Python. It's likely already installed, but check:
bash
pip3 --version
If not, install it:
bash
sudo apt install python3-pip
3. Navigate to the de3u Directory:
Open your terminal and navigate to the directory where you cloned or downloaded the de3u repository. Use the cd command. For example, if it's in your Downloads folder:
bash
cd Downloads/de3u
4. Create a Virtual Environment (Recommended):
Creating a virtual environment is highly recommended. It isolates the project's dependencies and prevents conflicts with other Python projects.
bash
python3 -m venv .venv # Creates a virtual environment named .venv
5. Activate the Virtual Environment:
bash
source .venv/bin/activate # Activates the virtual environment
You should see .venv in your terminal prompt, indicating the environment is active.
6. Install Dependencies:
Now install the required libraries listed in requirements.txt:
bash
pip3 install -r requirements.txt
This will install gradio, requests, Pillow, matplotlib, and setuptools.
7. Run the Application:
Finally, run the main Python script:
bash
python3 main.py
By default, this will launch the Gradio interface in your web browser at http://[Redacted IPAddress]:7860 and also open a new tab or window in your default browser.
Optional Arguments:
--no-browser -nb: Prevent the automatic opening of the web browser. You'll need to manually navigate to the URL in your browser.
--port -p <port_number>: Specify a different port if 7860 is already in use. For example: python3 main.py --port 8080
--no-sound -ns: Disable sound effects.
Troubleshooting:
Permission Errors: If you get permission errors, try running commands with sudo, but ideally, set up your permissions correctly so this isn't routinely needed.
Dependency Issues: Ensure your virtual environment is active. If you still have problems, try upgrading pip: pip3 install --upgrade pip
Port Conflicts: If the default port is in use, use the --port argument to specify a different one.
Firewall: If you're running a firewall, ensure it allows connections on the port you're using (7860 by default).
Keeping Your Installation Up-to-Date:
If the de3u repository is updated, you should pull the latest changes and reinstall the dependencies:
bash
git pull # If you cloned the repo using git
pip3 install -r requirements.txt # Reinstall/update dependencies
This process will ensure you have the latest features and bug fixes. Remember to do this within your activated virtual environment. If you didn't clone the repository with git, you'll need to re-download it instead of the git pull command.
That should cover everything for a thorough installation on Linux Mint 22. Let me know if you encounter any issues.