Skip to content

Instantly share code, notes, and snippets.

@mjuenema
Last active July 12, 2020 16:42
Show Gist options
  • Save mjuenema/ec5e6a1c5c482aed786e42f59a910d7d to your computer and use it in GitHub Desktop.
Save mjuenema/ec5e6a1c5c482aed786e42f59a910d7d to your computer and use it in GitHub Desktop.
Downloading Python Packages

Instructions for downloading Python packages for installation on a different host.

  1. Start a shell inside a CentOS/7 (or any other system) Docker Container with the exact version of Python that is installed on the other host.
mkdir /tmp/python-package
cd /tmp/python-package
docker run -i -t --rm --entrypoint /bin/bash -v `pwd`:/work python:3.7.0-centos7
  1. Install and upgrade pip3 (if it doesn't already exist)
yum install python3-pip
pip3 install --upgrade pip
  1. Download the packages.
cd /work
pip3 download <name>
  1. Exit the Docker Container
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment