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

Open
schlamar opened this issue Oct 16, 2015 · 15 comments

Comments

@schlamar
Copy link
Contributor

@schlamar schlamar commented Oct 16, 2015

--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

This comment has been minimized.

Copy link
Contributor

@xavfernandez xavfernandez commented Oct 16, 2015

--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

This comment has been minimized.

Copy link

@piotr-dobrogost piotr-dobrogost commented Oct 16, 2015

(...) 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

This comment has been minimized.

Copy link
Contributor Author

@schlamar schlamar commented Oct 16, 2015

>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

This comment has been minimized.

Copy link
Contributor

@xavfernandez xavfernandez commented Oct 16, 2015

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

@schlamar

This comment has been minimized.

Copy link
Contributor Author

@schlamar schlamar commented Oct 16, 2015

:)

@schlamar schlamar closed this Oct 16, 2015
@schlamar

This comment has been minimized.

Copy link
Contributor Author

@schlamar schlamar commented Oct 16, 2015

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

This comment has been minimized.

Copy link
Contributor

@xavfernandez xavfernandez commented Oct 16, 2015

@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

This comment has been minimized.

Copy link
Contributor

@xavfernandez xavfernandez commented Oct 16, 2015

@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

This comment has been minimized.

Copy link

@jerkyrs 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

This comment has been minimized.

Copy link
Member

@pradyunsg pradyunsg commented Jun 14, 2017

/request-tag docs

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

@dstufft dstufft added the type: docs label Jun 17, 2017
@dstufft dstufft reopened this Jun 17, 2017
@Vanuan Vanuan referenced this issue Dec 15, 2017
0 of 2 tasks complete
@honnibal

This comment has been minimized.

Copy link

@honnibal honnibal commented Mar 16, 2018

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

This comment has been minimized.

Copy link
Contributor

@pwaller 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

This comment has been minimized.

Copy link
Member

@pradyunsg pradyunsg commented Aug 16, 2018

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

This comment has been minimized.

Copy link
Member

@pfmoore 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

This comment has been minimized.

Copy link
Contributor

@keanemind keanemind commented Oct 4, 2018

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.