question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Better documentation on using --platform and --python-version

See original GitHub issue

What’s the problem this feature will solve? I want to use pip to download linux packages onto a mac.

I know that I need to use some combination of --platform, --python-version, --only-binary=:all:. but I don’t know the proper values for these options.

Describe the solution you’d like I would like the documentation from the command line tool to be clear, or the package documentation on pypi to be clear for each package what values were used for these options.

I am specifically trying to install pandas and sklearn for this example, but I think the issue is with the documentation.

for --platform I have tried linux linux_x86_64 for --python-version I have tried 3, 37, 3.7, cp37

I’m not sure if any of these are correct. I would expect the tool to offer example values ie

 cp37 is not a valid option for --python-platform try (3, 37, py37) instead

I am downloading these packages in order to package them into an AWS lambda function. I would rather not spin up a linux VM just to download packages.

Alternative Solutions

I also tried

pip search -vvv pandas

I would expect that command to list all possible platform/python-version options that are applicable for the package.

Thank you

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
uranusjrcommented, Jul 25, 2020

I think there are two areas we can improve here:

  1. Add some documentation around --platform, --python-version, --implementaion, and --abi (I believe they are in the same category). Explain what they do (they control what wheels are selected from the index) and provide some examples of valid inputs.
  2. Improve the error message when the user provides something wrong to any of those flags. It would be helpful to provide the user’s platform default as an example input.

Since these flags are for wheel selection, valid inputs are described in the wheel spec (PEP 427). It would be helpful to provide a short write-up in the documentation and link to the PEP and PyPA’s page for platform tags.

2reactions
paddymulcommented, Mar 31, 2019

I was just digging through the source code as you made this comment.

I eventually figured out that the arguments I wanted were manylinux1_x86_64 and 37

These were completely non-obvious. I looked at the files again and along with the source realized that manylinux1_x86_64 was the proper name.

This has solved my problem, but I still think that users could get very lost and confused when trying to use these options.

Read more comments on GitHub >

github_iconTop Results From Across the Web

platform — Access to underlying platform's identifying data ...
Specific platforms listed alphabetically, with Linux included in the Unix ... Returns the Python version as tuple (major, minor, patchlevel) of strings.
Read more >
Manage Python versions - Platform.sh Documentation
See how to manage different Python versions in your Platform.sh containers.
Read more >
Welcome to Flask — Flask Documentation (2.2.x)
Beyond Flask itself, look for community-maintained extensions to add even more functionality. Installation · Python Version · Dependencies · Virtual ...
Read more >
Get started | PyCharm Documentation - JetBrains
To start developing in Python with PyCharm you need to download and install Python from python.org depending on your platform. PyCharm supports ...
Read more >
Setting up a Python development environment | Google Cloud
You can read more about venv in the venv docs. Note: If you're using Anaconda, follow the instructions on their website. Installing an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found