install and config devpi as local pypi cache
install and config devpi
-
install
pip install -U devpi-server # if you want the web interface pip install -U devpi-web
-
init
devpi-init --serverdir ~/home/dev/devpi/mydevpiserver
-
gen config
cd ~/home/dev/devpi devpi-gen-config --port 3141 --host=0.0.0.0 --serverdir ./mydevpiserver
-
systemd
cd gen-config sudo cp devpi.service /etc/systemd/system
-
start service
sudo systemctl daemon-reload sudo systemdctl start devp
Use the devpi
export PYPI=http://192.168.0.135:3141/root/pypi/+simple/
export TRUSTED_HOST=192.168.0.135
pip3 install -i $PYPI --trusted-host=${TRUSTED_HOST} uwsgi