1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-10-31 23:26:20 +00:00

Mention to install cryptography when installing from source + structural adjustments

Blondel MONDESIR 2024-10-03 10:08:26 -04:00
parent 5e3980660d
commit 676bc5b60d

@ -1,50 +1,67 @@
#### Manual installation on Linux or MacOS
### Manual installation on Linux or MacOS
If you want to manually install Calibre-Web (“from source”), follow the procedure below.
If you want to manually install Calibre-Web (“from source”), follow the procedure below.
1. Make sure you have installed pip and also venv for your python version. If missing, install it by the package manager of your distribution (e.g., apt for debian like distributions)
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`
- `sudo apt install python3-pip python3-venv`
2. **Go to the folder where you want to install Calibre-Web**, e.g.,
- `cd /opt/calibre-web`
2. Go to the folder where you want to install Calibre-Web, e.g.,
- `cd /opt/calibre-web`
3. Create virtual environment for calibre web in the current folder
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
4. **Download and extract Calibre-Web** into the current folder (in this example, `/opt/calibre-web`) from the [releases page on Github](https://github.com/janeczku/calibre-web/releases).
5. Install dependencies by running
- `./venv/bin/python3 -m pip install -r requirements.txt`
5. **Install dependencies** by running:
- `./venv/bin/python3 -m pip install -r requirements.txt`
6. Execute the command:
- `./venv/bin/python3 cps.py` (or `nohup ./venv/bin/python3 cps.py` - recommended if you want to exit the terminal window)
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)
Issues on Raspberry Pi Raspberry Pi OS:
Depending on your version of pip it's possible that the installation fails with `Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects`. In this case please try to update pip with `./venv/bin/python3 -m pip install --upgrade pip` first, and then try installing Calibre-Web again. If this isn't working please also install cargo via `sudo apt install cargo`, and try again to install Calibre-Web.
#### Additional Issues and Considerations:
Issues with Ubuntu:
Please note that running the above install command can fail on some versions of Ubuntu, saying `"can't combine user with prefix"`. This is a [known bug](https://github.com/pypa/pip/issues/3826) and can be remedied by using the command `./venv/bin/python3 -m pip install --system -r requirements.txt` instead.
**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.
Remark: All config files (settings database, log files) are stored in Calibre-Web root folder (in this example /opt/calibre-web). Additional config files, such as the config files for gdrive and gmail have to be placed there too.
**Ubuntu**:
On some Ubuntu versions, you may see the error `can't combine user with prefix`. This is a [known bug](https://github.com/pypa/pip/issues/3826) and can be resolved by installing the requirements with the `--system` flag:
- `./venv/bin/python3 -m pip install --system -r requirements.txt`
#### Manual installation on Windows
**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.
For Windows pip and venv come with the basic installation. On Windows, the python binary can be found after installing the virtual environment under .\venv\script\python3.exe.
---
1. Download and install the newest python version for windows from here: [https://www.python.org/downloads/windows/](https://www.python.org/downloads/windows/)
### Manual Installation on Windows
2. Start an command prompt via "cmd". Go to the folder where you want to install Calibre-Web, e.g., `c:\calibre-web `
On Windows, pip and venv are included with the basic Python installation. Follow the steps below:
3. Create virtual environment for calibre web in folder venv. The python installation in the example is c:\python
- `c:\python\python.exe -m venv venv`
1. **Download and install the newest Python version** for Windows from [python.org](https://www.python.org/downloads/windows/).
4. Download and extract Calibre-Web into the current folder (in this example c:\calibre-web) from the releases page on Github
2. **Open a command prompt (cmd)** and navigate to the folder where you want to install Calibre-Web, e.g., `c:\calibre-web`.
5. Install dependencies by running `.\venv\script\python3.exe -m pip install -r requirements.txt` (executed from c:\calibre-web folder)
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`.)
6. Execute the command: `.\venv\script\python3.exe cps.py`
4. **Download and extract Calibre-Web** into the current folder (in this example, `c:\calibre-web`) from the [releases page on Github](https://github.com/janeczku/calibre-web/releases).
Remark: All config files (settings database, log files) are stored in Calibre-Web root page (in this example c:\calibre-web). Additional config files, such as the config files for gdrive and gmail have to be placed there too.
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.