Issue using pip download -r requirements.txt

11.6k Views Asked by At

I have my Python script and my requirements.txt ready.

What I want to do is to get all the packages listed in the "requirements.txt" into a folder. In the bundle, I'd for example have the full packages of "pymysql", "bs4" as well as all their dependencies.

I have absolutely no idea how to do this. Could you help me please? I am stuck and I am really struggling with this.

I am using Python 3.6

I am using "pip download -r requirements.txt" but it's not downloading the dependencies and outputs me only.whl files whereas I'm looking for "proper" folders..

1

There are 1 best solutions below

1
On

To make pip prefer source files over wheels, use the --no-binary flag:

pip download -r requirements.txt --no-binary :all: -d /path/to/download/dir