Skip to content

Manual Installation

Blondel MONDESIR edited this page Oct 3, 2024 · 52 revisions

Manual installation on Linux or MacOS

If you want to manually install Calibre-Web (“from source”), follow the procedure below.

  1. Ensure you have pip, venv, and cryptography installed.

    • Install pip, venv, and cryptography for your Python version using your package manager (e.g., apt for Debian-based distributions).
      • sudo apt install python3-pip python3-venv python3-cryptography
    • Alternatively, you can install the cryptography package inside the virtual environment for a more up-to-date version:
      • ./venv/bin/python3 -m pip install cryptography
  2. Go to the folder where you want to install Calibre-Web, e.g.,

    • cd /opt/calibre-web
  3. Create a virtual environment for Calibre-Web in the current folder:

    • python3 -m venv venv
  4. Download and extract Calibre-Web into the current folder (in this example, /opt/calibre-web) from the releases page on Github.

  5. Install dependencies by running:

    • ./venv/bin/python3 -m pip install -r requirements.txt
  6. Execute Calibre-Web with the command:

    • ./venv/bin/python3 cps.py
      (or use nohup ./venv/bin/python3 cps.py if you want to exit the terminal window)

Additional Issues and Considerations:

Raspberry Pi (Raspberry Pi OS):
Depending on your version of pip, the installation might fail with Failed to build cryptography. If you encounter this issue, try:

  1. Updating pip:
    • ./venv/bin/python3 -m pip install --upgrade pip
  2. If the error persists, install cargo:
    • sudo apt install cargo
  3. Then, try installing Calibre-Web again.

Ubuntu:
On some Ubuntu versions, you may see the error can't combine user with prefix. This is a known bug and can be resolved by installing the requirements with the --system flag:

  • ./venv/bin/python3 -m pip install --system -r requirements.txt

Configuration Files:
All configuration files (settings database, log files) are stored in the Calibre-Web root folder (in this example, /opt/calibre-web). Any additional config files, such as those for Google Drive or Gmail integration, should be placed there as well.


Manual Installation on Windows

On Windows, pip and venv are included with the basic Python installation. Follow the steps below:

  1. Download and install the newest Python version for Windows from python.org.

  2. Open a command prompt (cmd) and navigate to the folder where you want to install Calibre-Web, e.g., c:\calibre-web.

  3. Create a virtual environment for Calibre-Web in the folder venv:

    • c:\python\python.exe -m venv venv
      (This example assumes Python is installed in c:\python.)
  4. Download and extract Calibre-Web into the current folder (in this example, c:\calibre-web) from the releases page on Github.

  5. Install dependencies by running:

    • .\venv\Scripts\python3.exe -m pip install -r requirements.txt
      (Executed from the c:\calibre-web folder.)
  6. Execute Calibre-Web with the command:

    • .\venv\Scripts\python3.exe cps.py

Configuration Files:
All configuration files (settings database, log files) are stored in the Calibre-Web root folder (in this example, c:\calibre-web). Additional config files (e.g., for Google Drive or Gmail) should also be placed here.