Search code examples
pythonpip

How to download source distribution from pypi using pip?


I am creating a tool that analyzes a set of python package's source distributions. I am wondering if it is possible to use pip (or any other module) to download the source distribution tarball without installing or building it. I am going to process a lot of source distributions making manually downloading them individually from pypi.org a very tedious solution. Essentially I want something like:

>pip download_sdist foo
Successfully downloaded foo-1.2.3.tar.gz

Solution

  • Try this:

    pip3 download --no-deps --no-binary :all: {MODULE_HERE}