mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Reverted back to use pyenv (without using system wide packages)
This commit is contained in:
parent
d88e5eb308
commit
ddb1788c22
2 changed files with 8 additions and 7 deletions
4
Makefile
4
Makefile
|
@ -3,11 +3,9 @@ SHELL := /bin/bash
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
PYTHON_BIN := python
|
PYTHON_BIN := python
|
||||||
ACTIVATE_SCRIPT := pyenv/Scripts/activate
|
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
|
else
|
||||||
PYTHON_BIN := python3
|
PYTHON_BIN := python3
|
||||||
ACTIVATE_SCRIPT := pyenv/bin/activate
|
ACTIVATE_SCRIPT := pyenv/bin/activate
|
||||||
SYSTEM_PACKAGES := echo Skipping Windows Pythons system packages inheritance activation...
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.SHELLFLAGS := -eu -o pipefail -c
|
.SHELLFLAGS := -eu -o pipefail -c
|
||||||
|
@ -30,10 +28,10 @@ all: run
|
||||||
# - add qt if missing
|
# - add qt if missing
|
||||||
pyenv:
|
pyenv:
|
||||||
"${PYTHON_BIN}" -m venv pyenv && \
|
"${PYTHON_BIN}" -m venv pyenv && \
|
||||||
${SYSTEM_PACKAGES} && \
|
|
||||||
. "${ACTIVATE_SCRIPT}" && \
|
. "${ACTIVATE_SCRIPT}" && \
|
||||||
python --version && \
|
python --version && \
|
||||||
python -m pip install --upgrade pip setuptools && \
|
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
|
python -c 'import PyQt5' 2>/dev/null || python -m pip install -r qt/requirements.qt
|
||||||
|
|
||||||
# update build hash
|
# update build hash
|
||||||
|
|
|
@ -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 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 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. 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
|
1. After download the file for your Python version, you need to define the following environment
|
||||||
`python -m pip install PyAudio‑0.2.11‑cp38‑cp38‑win_amd64.whl`
|
variable before running anki:
|
||||||
1. If got an error from pip trying to build the `pyaudio` library,
|
`set "ANKI_EXTRA_PIP=python -m pip install full/path/to/PyAudio‑0.2.11‑cp38‑cp38‑win_amd64.whl"`
|
||||||
or there is not a wheel available for your Python version, you can built it from the source
|
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
|
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. 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 `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
|
1. Do not use any Cygwin terminal as `mintty.exe` because the `rust lang` compiler does not work with them
|
||||||
|
|
Loading…
Reference in a new issue