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

can't add a detectron2.git #3712

Closed
chiboreache opened this issue Feb 20, 2021 · 11 comments
Closed

can't add a detectron2.git #3712

chiboreache opened this issue Feb 20, 2021 · 11 comments
Labels
kind/bug Something isn't working as expected

Comments

@chiboreache
Copy link

chiboreache commented Feb 20, 2021

torch = "^1.7.1"
torchvision = "^0.8.2"

detectron2 = { git = "https://github.com/facebookresearch/detectron2.git" }
(.venv) ↪ git:(master) ✗ poetry add 'git+https://github.com/facebookresearch/detectron2.git'

  PackageInfoError

  Unable to determine package info for path: /tmp/pypoetry-git-detectron2xbu28up4
  
  Fallback egg_info generation failed.
  
  Command ['/tmp/tmpbor3ipq5/.venv/bin/python', 'setup.py', 'egg_info'] errored with the following return code 1, and output: 
  Traceback (most recent call last):
    File "/tmp/pypoetry-git-detectron2xbu28up4/setup.py", line 10, in <module>
      import torch
  ModuleNotFoundError: No module named 'torch'

  at /usr/lib/python3.9/site-packages/poetry/inspection/info.py:502 in _pep517_metadata
      498│                 try:
      499│                     venv.run("python", "setup.py", "egg_info")
      500│                     return cls.from_metadata(path)
      501│                 except EnvCommandError as fbe:
    → 502│                     raise PackageInfoError(
      503│                         path, "Fallback egg_info generation failed.", fbe
      504│                     )
      505│                 finally:
      506│                     os.chdir(cwd.as_posix())
(.venv) ↪ git:(master) ✗ 

https://detectron2.readthedocs.io/en/latest/tutorials/install.html

my guess this is need sort of post install key

@chiboreache chiboreache added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 20, 2021
@chiboreache
Copy link
Author

extracted whl from site, but w/o luck

(.venv) ↪ git:(master) ✗ poetry add https://dl.fbaipublicfiles.com/detectron2/wheels/cu110/torch1.7/detectron2-0.3%2Bcu110-cp38-cp38-linux_x86_64.whl

Updating dependencies
Resolving dependencies... (27.0s)

Writing lock file

Package operations: 33 installs, 0 updates, 0 removals

  • Installing certifi (2020.12.5)
  • Installing chardet (4.0.0)
  • Installing idna (2.10)
  • Installing pyasn1 (0.4.8)
  • Installing urllib3 (1.26.3)
  • Installing cachetools (4.2.1)
  • Installing oauthlib (3.1.0)
  • Installing pyasn1-modules (0.2.8)
  • Installing requests (2.25.1)
  • Installing rsa (4.7.1)
  • Installing google-auth (1.27.0)
  • Installing portalocker (2.2.1)
  • Installing requests-oauthlib (1.3.0)
  • Installing tqdm (4.57.0)
  • Installing absl-py (0.11.0)
  • Installing cython (0.29.22)
  • Installing google-auth-oauthlib (0.4.2)
  • Installing grpcio (1.35.0)
  • Installing iopath (0.1.4)
  • Installing markdown (3.3.3)
  • Installing protobuf (3.15.1)
  • Installing tabulate (0.8.8)
  • Installing tensorboard-plugin-wit (1.8.0)
  • Installing termcolor (1.1.0)
  • Installing werkzeug (1.0.1)
  • Installing yacs (0.1.8)
  • Installing cloudpickle (1.6.0)
  • Installing future (0.18.2)
  • Installing fvcore (0.1.3.post20210220)
  • Installing pycocotools (2.0.2)
  • Installing pydot (1.4.2)
  • Installing tensorboard (2.4.1)
  • Installing detectron2 (0.3+cu110 https://dl.fbaipublicfiles.com/detectron2/wheels/cu110/torch1.7/detectron2-0.3%2Bcu110-cp38-cp38-linux_x86_64.whl): Failed

  EnvCommandError

  Command ['/home/chibo/Documents/CODE/fapp-dcnn/FAPP/.venv/bin/pip', 'install', '--no-deps', '/home/chibo/.cache/pypoetry/artifacts/6a/c6/62/c79b2b8d774b97f8eaea68e81bf2cf10224b582c45c3fb596a5af19aa9/detectron2-0.3+cu110-cp38-cp38-linux_x86_64.whl'] errored with the following return code 1, and output: 
  ERROR: detectron2-0.3+cu110-cp38-cp38-linux_x86_64.whl is not a supported wheel on this platform.
  

  at /usr/lib/python3.9/site-packages/poetry/utils/env.py:1074 in _run
      1070│                 output = subprocess.check_output(
      1071│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1072│                 )
      1073│         except CalledProcessError as e:
    → 1074│             raise EnvCommandError(e, input=input_)
      1075│ 
      1076│         return decode(output)
      1077│ 
      1078│     def execute(self, bin, *args, **kwargs):


Failed to add packages, reverting the pyproject.toml file to its original content.
(.venv) ↪ git:(master) ✗ 

@chiboreache
Copy link
Author

same with detectron2 = { url = "https://dl.fbaipublicfiles.com/detectron2/wheels/cu110/torch1.7/detectron2-0.3%2Bcu110-cp38-cp38-linux_x86_64.whl" }

@chiboreache
Copy link
Author

NO WAY.

detectron2 = { url = "https://github.com/facebookresearch/detectron2/archive/v0.3.tar.gz" }

(.venv) ↪ git:(master) ✗ poetry update
Updating dependencies
Resolving dependencies... (3.7s)

  RuntimeError

  Unable to determine package info from path: /tmp/tmpnafbs924/v0.3.tar.gz

  at /usr/lib/python3.9/site-packages/poetry/puzzle/provider.py:251 in get_package_from_file
      247│             package = PackageInfo.from_path(path=file_path).to_package(
      248│                 root_dir=file_path
      249│             )
      250│         except PackageInfoError:
    → 251│             raise RuntimeError(
      252│                 "Unable to determine package info from path: {}".format(file_path)
      253│             )
      254│ 
      255│         return package
(.venv) ↪ git:(master) ✗ 

@chiboreache
Copy link
Author

god i hate fb, so much hate....

@finswimmer
Copy link
Member

Hello @chiboreache,

detectron2 = { git = "https://github.com/facebookresearch/detectron2.git" }

Accoring to the setup.py, torch is needed to build the wheel, but the maintainers doesn't provide a pyproject.toml according to PEP 518. I've described a workaround on stackoverflow for a similar case. But it would be nice, if you can open an issue in dectron2 issue tracker.

ERROR: detectron2-0.3+cu110-cp38-cp38-linux_x86_64.whl is not a supported wheel on this platform.

What OS are you using and what python version? Furthermore I'm not sure if the filename is correct according to PEP 491 🤔

fin swimmer

@chiboreache
Copy link
Author

@finswimmer

I've described a workaround on stackoverflow for a similar case.

thanks, i'll try

Arch Linux, everything is bleeding edge, python 3.9

if you can open an issue in dectron2 issue tracker.

sure

@chiboreache
Copy link
Author

@mzhadigerov
Copy link

mzhadigerov commented Oct 31, 2021

Hi! Have you solved this problem?

@chiboreache
Copy link
Author

Hi! Have you solved this problem?

yeah, simply by get rid of poetry

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
@abn
Copy link
Member

abn commented May 12, 2022

I have raised facebookresearch/detectron2#4234 to fix the issue. The issue exists even in cases where pip, build or any other PEP 517 tooling is used.

Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

4 participants