Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

python 3.x - pip download specificying platform any - results in no matching distributions

I am trying to download python dependencies for a case where a system doesn't have network access. If I perform the downloads on my mac without specifying the platform and only-binary everything works fine. However, if I specify --only-binary:all: and --platform any, it gives me an error that it can't find distributions (like pandas). Do I need to run this on a windows machine for it to work? What am I doing wrong?

I have been referencing the pip download info: https://pip.pypa.io/en/stable/reference/pip_download/

py -m pip download ^
   --only-binary=:all: ^
   --platform any ^
   --python-version 3 ^
   --implementation py ^
   --abi none ^
   SomePackage

Works:

python -m pip download -d ./packages pandas -r requirements.txt

Doesn't work:

python -m pip download --only-binary=:all: --platform any --python-version 3 -d ./packages pandas -r requirements.txt

Error:

ERROR: Could not find a version that satisfies the requirement pandas (from versions: none)
ERROR: No matching distribution found for pandas

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...