Neel
Neel

Reputation: 21253

Always download tar.gz from pypi server

I have local pypi server, where I download the packages from https://pypi.org/simple/

I ran command

pip install -d /srv/pypi/ cryptography==2.2.2

And it installed cryptography-2.2.2-cp34-abi3-manylinux1_x86_64.whl in my local pypi server.

When I try to use that pypi server to download package on non linux platform, it fails.

Then I downloaded cryptography-2.2.2.tar.gz and put in local pypi, then it works fine.

How can I say in pip install -d command to always download tar.gz for that package ?

Upvotes: 1

Views: 3243

Answers (1)

wim
wim

Reputation: 362826

Specify the --no-binary flag. To use sdist for cryptography:

pip install --no-binary cryptography cryptography 

To use sdist for everything:

pip install --no-binary :all: cryptography

Upvotes: 1

Related Questions