Page MenuHomeIssueTracker

venv-setup.sh
ActivePublic

Authored by revi on Feb 1 2024, 17:47.
Referenced Files
F505: venv-setup.sh
Feb 1 2024, 17:47
Subscribers
None
#!/bin/bash
# Install Pywikibot in a virtual environment from git sources
# (Pywikibot's PyPi package does not include scripts)
# clean up directories if they already exist
rm -fdr pwbvenv $HOME/core
# create a new virtual environment
python3 -m venv pwbvenv
# activate it
source pwbvenv/bin/activate
# clone Pywikibot
git clone --recursive --branch stable "https://gerrit.wikimedia.org/r/pywikibot/core" $HOME/core
# install dependencies
pip3 install --upgrade pip setuptools wheel
pip3 install $HOME/core[mwoauth,mysql]