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.

requirements.txt: option to specify if a specific entry should be installed from source or wheel

See original GitHub issue

Hello, we have a pretty long requirements.txt file (170+ entries) and we recently upgraded pip to 9.0.1 which seems (correct me if i’m wrong) to prefer to install the manylinux wheel, if present, over the source tarball when a simple module==version is specified.

Now, we do need to install a wheel for a specific module but for all the others we prefer to install and build from source (in particular as in some situation we cannot use the wheel at all, cfr https://github.com/numpy/numpy/issues/7570, and there are many of such modules).

is there a way to extend the r.txt entry from module==version to a format that specify if to install that module from wheel or source? or just tell pip to install all modules from source tarball except for a specific list of modules that need to be installed from wheel? for now we are replacing the problematic entries with hardcoded URLs to the source tarballs on PyPI but it’s ugly, less expressive and fragile.

thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
pfmoorecommented, Feb 27, 2017

Sorry, I meant to add a link to the docs - https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption--no-binary it should all be in there (and under “Requirements file format” if you want to do it in a requirements file), but basically

$ pip install module==version --no-binary=module
1reaction
pfmoorecommented, Feb 27, 2017

The --no-binary and --only-binary flags are probably what you want. They can be specified on the command line or in a requirements file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Python Requirements File and How to Create it
Use the pip install -r requirements. txt command to install all of the Python modules and packages listed in your requirements. txt file....
Read more >
requirements.txt vs setup.py in Python
Discussing about the difference and use of requirements.txt, setup.py ... If a pin is used, then you can specify a specific package version ......
Read more >
How to specify install order for python pip?
You can just use: cat requirements.txt | xargs pip install.
Read more >
User Guide - pip documentation v22.3.1
If no satisfactory wheels are found, pip will default to finding source archives. To install directly from a wheel archive: Unix/macOS. python -m...
Read more >
Manage required Python packages with requirements.txt
The requirements.txt files contain precise versions of all installed packages, and you can use these files to freeze the requirements of 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