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

Failed to install offline #2031

Closed
idanmiara opened this issue Mar 10, 2021 · 5 comments
Closed

Failed to install offline #2031

idanmiara opened this issue Mar 10, 2021 · 5 comments
Labels
C: packaging Installation and packaging of Black T: bug Something isn't working

Comments

@idanmiara
Copy link

idanmiara commented Mar 10, 2021

Describe the bug A clear and concise description of what the bug is.

Failed to install a downloaded black package with pip

To Reproduce Steps to reproduce the behavior:

python -m pip download black -d .\wheels - seems to download the right packages to .\wheels
python -m pip install --no-index --find-links .\wheels black - fails

Expected behavior A clear and concise description of what you expected to happen.

The downloaded package should be installable offline as any other package via pip.

Environment (please complete the following information):

  • Version: black-20.8b1.tar.gz
  • OS and Python version: Python 3.8.7 (64bit and also 32bit) on Win10 64bit.

Does this bug also happen on master? To answer this, you have two options:

irrelevant - the bug concerns the package installation.

Additional context Add any other context about the problem here.

d:\dev\Python38>python -m pip --version
pip 20.2.3 from d:\dev\Python38\lib\site-packages\pip (python 3.8)

d:\dev\Python38>python -m pip download black -d .\wheels
Collecting black
  Using cached black-20.8b1.tar.gz (1.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
  Saved d:\dev\python38\wheels\black-20.8b1.tar.gz
Collecting click>=7.1.2
  Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
  Saved d:\dev\python38\wheels\click-7.1.2-py2.py3-none-any.whl
Collecting mypy-extensions>=0.4.3
  Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
  Saved d:\dev\python38\wheels\mypy_extensions-0.4.3-py2.py3-none-any.whl
Collecting typing-extensions>=3.7.4
  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
  Saved d:\dev\python38\wheels\typing_extensions-3.7.4.3-py3-none-any.whl
Collecting pathspec<1,>=0.6
  Using cached pathspec-0.8.1-py2.py3-none-any.whl (28 kB)
  Saved d:\dev\python38\wheels\pathspec-0.8.1-py2.py3-none-any.whl
Collecting toml>=0.10.1
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
  Saved d:\dev\python38\wheels\toml-0.10.2-py2.py3-none-any.whl
Collecting regex>=2020.1.8
  Using cached regex-2020.11.13-cp38-cp38-win_amd64.whl (270 kB)
  Saved d:\dev\python38\wheels\regex-2020.11.13-cp38-cp38-win_amd64.whl
Collecting typed-ast>=1.4.0
  Using cached typed_ast-1.4.2-cp38-cp38-win_amd64.whl (158 kB)
  Saved d:\dev\python38\wheels\typed_ast-1.4.2-cp38-cp38-win_amd64.whl
Collecting appdirs
  Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
  Saved d:\dev\python38\wheels\appdirs-1.4.4-py2.py3-none-any.whl
Successfully downloaded black click mypy-extensions typing-extensions pathspec toml regex typed-ast appdirs
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the 'd:\dev\Python38\python.exe -m pip install --upgrade pip' command.

d:\dev\Python38>python -m pip install --no-index --find-links .\wheels black
Looking in links: .\wheels
Processing d:\dev\python38\wheels\black-20.8b1.tar.gz
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'd:\dev\Python38\python.exe' 'd:\dev\Python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\idanm\AppData\Local\Temp\pip-build-env-zp9jdoqc\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links '.\wheels' -- 'setuptools>=41.0' setuptools-scm wheel
       cwd: None
  Complete output (3 lines):
  Looking in links: .\wheels
  ERROR: Could not find a version that satisfies the requirement setuptools>=41.0 (from versions: none)
  ERROR: No matching distribution found for setuptools>=41.0
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\dev\Python38\python.exe' 'd:\dev\Python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\idanm\AppData\Local\Temp\pip-build-env-zp9jdoqc\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links '.\wheels' -- 'setuptools>=41.0' setuptools-scm wheel Check the logs for full command output.

d:\dev\Python38>dir .\wheels
 Volume in drive D is Main

 Directory of d:\dev\Python38\wheels

10/03/2021  14:34    <DIR>          .
10/03/2021  14:34    <DIR>          ..
10/03/2021  14:34             9,566 appdirs-1.4.4-py2.py3-none-any.whl
10/03/2021  14:34         1,096,433 black-20.8b1.tar.gz
10/03/2021  14:34            82,780 click-7.1.2-py2.py3-none-any.whl
10/03/2021  14:34             4,470 mypy_extensions-0.4.3-py2.py3-none-any.whl
10/03/2021  14:34            28,724 pathspec-0.8.1-py2.py3-none-any.whl
10/03/2021  14:34           270,367 regex-2020.11.13-cp38-cp38-win_amd64.whl
10/03/2021  14:34            16,588 toml-0.10.2-py2.py3-none-any.whl
10/03/2021  14:34           158,621 typed_ast-1.4.2-cp38-cp38-win_amd64.whl
10/03/2021  14:34            22,544 typing_extensions-3.7.4.3-py3-none-any.whl
               9 File(s)      1,690,093 bytes
@idanmiara idanmiara added the T: bug Something isn't working label Mar 10, 2021
@JelleZijlstra
Copy link
Collaborator

I guess the problem here is that we don't provide a wheel, and while building the sdist we require setuptools. I'm actually not sure why there are no wheels for the most recent two releases; perhaps @cooperlees knows?

@ichard26
Copy link
Collaborator

ichard26 commented Mar 10, 2021

For context, the reason why building from the sdist is a pain is that the build isolation pip enforces by default (see PEP 517) means installing a fresh setuptools and wheel into such isolated build environment. Now your locally curated wheelhouse doesn't have a copy of setuptools or wheel so the isolated build environment creation failed.

A bypass is passing --no-build-isolation to pip.

@JelleZijlstra for 20.8b1, the wheel had outdated files in it due to being built in a dirty environment, so it was deleted. Maybe same story for 20.8b0?

@ichard26
Copy link
Collaborator

Maybe same story for 20.8b0?

Doing some digging, yes, same story for 20.8b0.

@idanmiara
Copy link
Author

Thanks for the prompt replies!
I can confirm that the problem does NOT persist with black-19.10b0-py36-none-any.whl

@JelleZijlstra
Copy link
Collaborator

We do have wheels for the last few releases, so this should no longer be a problem.

@ichard26 ichard26 added the C: packaging Installation and packaging of Black label May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: packaging Installation and packaging of Black T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants