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

pip install torchvision started failing #4689

Closed
zpapakipos opened this issue Oct 21, 2021 · 7 comments
Closed

pip install torchvision started failing #4689

zpapakipos opened this issue Oct 21, 2021 · 7 comments

Comments

@zpapakipos
Copy link

🐛 Describe the bug

We have a GitHub action workflow in our library AugLy which runs automatically when a PR is updated. This workflow suddenly started failing on the line pip install pyre-check pytest torchvision. See here a run of the workflow which succeeded 2 days ago & here the one that fails today. Looking at the error message & output (pasted below), this seems to be due to an error while installing torchvision.

Full error message:

Run pip install pyre-check pytest torchvision
Collecting pyre-check
  Downloading pyre_check-0.9.6-py3-none-manylinux1_x86_64.whl (18.7 MB)
Collecting pytest
  Downloading pytest-6.2.5-py3-none-any.whl (280 kB)
Collecting torchvision
  Downloading torchvision-0.2.2.post3-py2.py3-none-any.whl (64 kB)
Collecting tabulate
  Downloading tabulate-0.8.9-py3-none-any.whl (25 kB)
Collecting async-generator
  Downloading async_generator-1.10-py3-none-any.whl (18 kB)
Collecting libcst>=0.3.6
  Downloading libcst-0.3.21-py3-none-any.whl (514 kB)
Collecting typing-extensions
  Downloading typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Collecting click
  Downloading click-8.0.3-py3-none-any.whl (97 kB)
Collecting psutil
  Downloading psutil-5.8.0.tar.gz (470 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting pyre-extensions
  Downloading pyre_extensions-0.0.22-py3-none-any.whl (10 kB)
Collecting dataclasses-json
  Downloading dataclasses_json-0.5.6-py3-none-any.whl (25 kB)
Collecting pywatchman
  Downloading pywatchman-1.4.1.tar.gz (29 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting iniconfig
  Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting packaging
  Downloading packaging-21.0-py3-none-any.whl (40 kB)
Collecting py>=1.8.2
  Downloading py-1.10.0-py2.py3-none-any.whl (97 kB)
Collecting toml
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting attrs>=19.2.0
  Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting pluggy<2.0,>=0.12
  Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting numpy
  Downloading numpy-1.21.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB)
Collecting pillow>=4.1.1
  Downloading Pillow-8.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Collecting six
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting torch
  Downloading torch-0.1.2.post2.tar.gz (128 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting typing-inspect>=0.4.0
  Downloading typing_inspect-0.7.1-py3-none-any.whl (8.4 kB)
Collecting pyyaml>=5.2
  Downloading PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)
Collecting marshmallow<4.0.0,>=3.3.0
  Downloading marshmallow-3.14.0-py3-none-any.whl (47 kB)
Collecting marshmallow-enum<2.0.0,>=1.5.1
  Downloading marshmallow_enum-1.5.1-py2.py3-none-any.whl (4.2 kB)
Collecting pyparsing>=2.0.2
  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting mypy-extensions>=0.3.0
  Downloading mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
WARNING: The candidate selected for download or install is a yanked version: 'torch' candidate (version 0.1.2.post2 at https://files.pythonhosted.org/packages/f8/02/880b468bd382dc79896eaecbeb8ce95e9c4b99a24902874a2cef0b562cea/torch-0.1.2.post2.tar.gz#sha256=a43e37f8f927c5b18f80cd163daaf6a1920edafcab5102e02e3e14bb97d9c874 (from https://pypi.org/simple/torch/))
Using legacy 'setup.py install' for psutil, since package 'wheel' is not installed.
Reason for being yanked: 0.1.2 is past it's support date and confuses users on unsupported platforms
Using legacy 'setup.py install' for pywatchman, since package 'wheel' is not installed.
Using legacy 'setup.py install' for torch, since package 'wheel' is not installed.
Installing collected packages: typing-extensions, mypy-extensions, marshmallow, typing-inspect, pyyaml, pyparsing, marshmallow-enum, torch, toml, tabulate, six, pywatchman, pyre-extensions, py, psutil, pluggy, pillow, packaging, numpy, libcst, iniconfig, dataclasses-json, click, attrs, async-generator, torchvision, pytest, pyre-check
    Running setup.py install for torch: started
    ERROR: Command errored out with exit status 1:
     command: /opt/hostedtoolcache/Python/3.10.0/x64/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qe9j63_3/torch_5d1ebf10fc5746f189a34b48c834f044/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qe9j63_3/torch_5d1ebf10fc5746f189a34b48c834f044/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ej81pbk2/install-record.txt --single-version-externally-managed --compile --install-headers /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/torch
         cwd: /tmp/pip-install-qe9j63_3/torch_5d1ebf10fc5746f189a34b48c834f044/
    Complete output (23 lines):
    running install
    running build_deps
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-qe9j63_3/torch_5d1ebf10fc5746f189a34b48c834f044/setup.py", line 225, in <module>
        setup(name="torch", version="0.1.2.post2",
      File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-qe9j63_3/torch_5d1ebf10fc5746f189a34b48c834f044/setup.py", line 99, in run
        self.run_command('build_deps')
      File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-qe9j63_3/torch_5d1ebf10fc5746f189a34b48c834f044/setup.py", line 51, in run
        from tools.nnwrap import generate_wrappers as generate_nn_wrappers
    ModuleNotFoundError: No module named 'tools.nnwrap'
    ----------------------------------------
    Running setup.py install for torch: finished with status 'error'
ERROR: Command errored out with exit status 1: /opt/hostedtoolcache/Python/3.10.0/x64/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qe9j63_3/torch_5d1ebf10fc5746f189a34b48c834f044/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qe9j63_3/torch_5d1ebf10fc5746f189a34b48c834f044/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ej81pbk2/install-record.txt --single-version-externally-managed --compile --install-headers /opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10/torch Check the logs for full command output.
Error: Process completed with exit code 1.

Versions

I can't run this since it's through a GitHub workflow.

@NicolasHug
Copy link
Member

Thanks for the report @zpapakipos

Collecting torchvision
Downloading torchvision-0.2.2.post3-py2.py3-none-any.whl (64 kB)

We keep having issues with this 0.2.2... #4665 #4085 #4076

Do you happen to have changed anything related to opencv or ffmpeg in Augly recently?

@jbitton
Copy link
Contributor

jbitton commented Oct 21, 2021

@NicolasHug we haven't changed our dependencies in three months, and our workflow hasn't been updated since last month

@NicolasHug
Copy link
Member

NicolasHug commented Oct 21, 2021

Thanks for the update. I'm not sure what can be causing this TBH.

We're in the process of releasing torchvision 0.11 as we speak. I'm hoping that the issue will magically disappear once the binaries are up on PyPI, which should be by the end of the day.

EDIT: actually, they're already up https://pypi.org/project/torchvision/#history

@jbitton
Copy link
Contributor

jbitton commented Oct 21, 2021

sounds good, I'll comment on here once we determine if the issue is still persisting or not!

[edit] just checked and it seems like we're still pulling 0.2.2 from a workflow 3hrs ago: https://github.com/facebookresearch/AugLy/runs/3967331383?check_suite_focus=true

do you think it's worth specifying the specific torchvision version you mentioned instead of going by defaults?

@NicolasHug
Copy link
Member

yes it'd be interesting to try with the constraint torchvision>=0.11

also maybe try a more verbose version of pip so we can hopefully see why 0.2.2 gets picked up

@jbitton
Copy link
Contributor

jbitton commented Oct 22, 2021

So I looked into what was the difference between our workflows from 3 days ago (which passed) and our newer ones that failed -- the difference was that in our newer workflows GitHub started to download python 3.10 as opposed to 3.9.7. For some reason, it seems as if newer versions of torch/torchvision are not available in 3.10 (as soon as we specified to use python 3.9 we were able to find & download torchvision 0.11).

[edit] feel free to close this issue if it is expected behavior for newer torch versions to be unavailable in 3.10! our use case is unblocked for now :)

@NicolasHug
Copy link
Member

Thanks for investigating, indeed 3.10 isn't supported by pytorch yet :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants