diff --git a/Makefile b/Makefile index 55a697300..2815e9ad7 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,9 @@ SHELL := /bin/bash ifeq ($(OS),Windows_NT) PYTHON_BIN := python ACTIVATE_SCRIPT := pyenv/Scripts/activate - SYSTEM_PACKAGES := sed -iv -- "s/include-system-site-packages\s*=\s*false/include-system-site-packages = true/g" pyenv/pyvenv.cfg else PYTHON_BIN := python3 ACTIVATE_SCRIPT := pyenv/bin/activate - SYSTEM_PACKAGES := echo Skipping Windows Pythons system packages inheritance activation... endif .SHELLFLAGS := -eu -o pipefail -c @@ -30,10 +28,10 @@ all: run # - add qt if missing pyenv: "${PYTHON_BIN}" -m venv pyenv && \ - ${SYSTEM_PACKAGES} && \ . "${ACTIVATE_SCRIPT}" && \ python --version && \ python -m pip install --upgrade pip setuptools && \ + ${ANKI_EXTRA_PIP} && \ python -c 'import PyQt5' 2>/dev/null || python -m pip install -r qt/requirements.qt # update build hash diff --git a/README.development b/README.development index 6db22b641..bcc00b127 100644 --- a/README.development +++ b/README.development @@ -91,11 +91,14 @@ Windows users (using Visual Studio) 1. Download and install pip for your Windows Python (`python -m ensurepip`). 1. Download and install rust (compiler), npm, git and put them your system path. 1. Download and install the pyaudio wheel from: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio - 1. After download the file for your Python version, you can install it using a command like - `python -m pip install PyAudio‑0.2.11‑cp38‑cp38‑win_amd64.whl` - 1. If got an error from pip trying to build the `pyaudio` library, - or there is not a wheel available for your Python version, you can built it from the source + 1. After download the file for your Python version, you need to define the following environment + variable before running anki: + `set "ANKI_EXTRA_PIP=python -m pip install full/path/to/PyAudio‑0.2.11‑cp38‑cp38‑win_amd64.whl"` + 1. If there is not an wheel available for your Python version, you can built it from the source following the installation instructions on: https://github.com/evandroforks/pyaudio + After building and installing portaudio, you need to define the following environment + variable before running anki: + `set "ANKI_EXTRA_PIP=python -m pip install git+https://github.com/evandroforks/pyaudio"` 1. Open a `cmd.exe` (command prompt) on the anki repository and run the command `sh run` 1. Do not use `bash run` because it my call for Windows Subsystem for Linux 1. Do not use any Cygwin terminal as `mintty.exe` because the `rust lang` compiler does not work with them