Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-binary / no-use-wheel mismatch #3191

Closed
schlamar opened this issue Oct 16, 2015 · 19 comments · Fixed by #7931
Closed

no-binary / no-use-wheel mismatch #3191

schlamar opened this issue Oct 16, 2015 · 19 comments · Fixed by #7931
Labels
auto-locked Outdated issues that have been locked by automation good first issue A good item for first time contributors to work on type: docs Documentation related

Comments

@schlamar
Copy link
Contributor

--no-binary still installs a wheel if this is a non-binary wheel. So --no-binary is not an 1:1 replacement for --no-use-wheel and therefore the latter shouldn't be marked as deprecated.

See #1891 why --no-use-wheel is still an important option.

@xavfernandez
Copy link
Member

--no-binary still installs a wheel if this is a non-binary wheel.

Do you have an example ?

With pip 7.1.2, pip install django --no-binary django downloads and installs the .tar.gz (and not the non-binary wheel) just like with --no-use-wheel.

@piotr-dobrogost
Copy link

(...) if this is a non-binary wheel.

Am I missing something or from pip's point of view there's either source package (sdist) or binary package (wheel) so there's no such thing like non-binary wheel?

@schlamar
Copy link
Contributor Author

>pip --version
pip 7.1.2 from C:\Python27\lib\site-packages (python 2.7)

>pip install --no-binary all pytest
Collecting pytest
  Using cached pytest-2.8.2-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in c:\python27\lib\site-packages (from pytest)
Requirement already satisfied (use --upgrade to upgrade): colorama in c:\python27\lib\site-packages (from pytest)
Installing collected packages: pytest
Successfully installed pytest-2.8.2

@xavfernandez
Copy link
Member

The correct syntax is pip install --no-binary :all: pytest 😃

@schlamar
Copy link
Contributor Author

:)

@schlamar
Copy link
Contributor Author

BTW, I thought this was just some emphasis issue in the docs, maybe you should better format this to make it clear the colons should be included.

@xavfernandez
Copy link
Member

@schlamar PR/improvements are welcome :)

This is currently documented here: https://pip.pypa.io/en/stable/reference/pip_install/#install-no-binary
or when running pip install --help:

--no-binary <format_control>
                          Do not use binary packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either :all: to disable all binary packages, :none: to empty the set,
                          or one or more package names with commas between them. Note that some packages are tricky to compile and may fail to install when this option is used on them.```

Maybe add an example using --no-binary :all: syntax in one of the examples https://pip.pypa.io/en/stable/reference/pip_install/#examples ?

@xavfernandez
Copy link
Member

@piotr-dobrogost

Am I missing something or from pip's point of view there's either source package (sdist) or binary package (wheel) so there's no such thing like non-binary wheel?

Yes, pip makes no difference between pure python wheels and the other wheels except of course when matching the compatibility tags.

@jerkyrs
Copy link

jerkyrs commented Jun 14, 2017

This really needs an example as pointed out by @schlamar , i thought the same thing that :all: was just to emphasize and noticed binary still being install. Inline example would be best.

@pradyunsg
Copy link
Member

/request-tag docs

Can this be reopened again, to track the relevant documentation update?

@dstufft dstufft added the type: docs Documentation related label Jun 17, 2017
@dstufft dstufft reopened this Jun 17, 2017
@xavfernandez xavfernandez added the good first issue A good item for first time contributors to work on label Sep 1, 2017
@Vanuan Vanuan mentioned this issue Dec 15, 2017
2 tasks
@honnibal
Copy link

I get tricked by this all the time. I write:

 `pip install -r requirements.txt --no-binary --no-cache-dir`

The --no-cache-dir gets read as the argument to --no-binary, and pip goes and does exactly what I didn't want.

@pwaller
Copy link
Contributor

pwaller commented Aug 16, 2018

Oh man @honnibal. You just cracked my problem. I wrote pip install --no-binary --user <packages> and then was totally confused as to why I was seeing:

Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages'
Consider using the `--user` option or check the permissions.

I wasn't expecting --no-binary to take an argument :(

@pradyunsg
Copy link
Member

I wasn't expecting --no-binary to take an argument :(

Yeah. I now think it might be useful to have pip abort if --no-binary/--only-binary gets an argument that starts with a -. This is essentially an invalid PEP440 name IIUC and would cover users who do something like this.

Thoughts @pypa/pip-committers?

@pfmoore
Copy link
Member

pfmoore commented Aug 16, 2018

That sounds like a good idea. It won't catch every issue (pip install --no-binary mypkg is also a common error) but there's no harm and it will help.

@keanemind
Copy link
Contributor

@pfmoore I would like to help with this, but I am not 100% sure where I am supposed to do the check. Would the _handle_no_binary and _handle_only_binary functions in cmdoptions.py be the right place?

@brainwane
Copy link
Contributor

Hi! Is this issue still reproducible or was it fixed in #5847?

@uranusjr
Copy link
Member

uranusjr commented Jan 29, 2020

IMO the help message can still be made clearer. Quoting from above:

[…] I thought the same thing that :all: was just to emphasize and noticed binary still being install[ed]. Inline example would be best.

Maybe adding quotes would help, e.g.:

Do not use binary packages. Can be supplied multiple times, and each time adds to the
existing value. Accepts either ":all:" to disable all binary packages, ":none:" to empty
the set, or […].

@ojasdeshpande10
Copy link

how can the help message be accessed??

@cjc7373
Copy link
Contributor

cjc7373 commented Mar 29, 2020

Based on the views above, I think what we need to do is to emphasize the existence of colons and provide some examples.
I'll make a PR later.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 5, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation good first issue A good item for first time contributors to work on type: docs Documentation related
Projects
None yet
Development

Successfully merging a pull request may close this issue.