From 30fe2ca252620f54acc2916f74ea9d8fc904a379 Mon Sep 17 00:00:00 2001 From: Roberto Tyley Date: Sun, 22 Oct 2023 23:08:41 +0100 Subject: [PATCH] Fix inconsistent pip package name This project is released as `segment-anything-hq` in pip: https://pypi.org/project/segment-anything-hq/ ...but the setup here just said `segment_anything`, which seems to be the cause of this error message: ``` WARNING: Generating metadata for package segment-anything-hq produced metadata for project name segment-anything ``` ...while trying to pip install a requirements file that had a line like this: ``` segment-anything-hq @ git+https://github.com/SysCV/sam-hq@5fd027ec559806dec9f876b56938175a63dfc625 ``` Full error logs: ``` Collecting segment-anything-hq@ git+https://github.com/SysCV/sam-hq@5fd027ec559806dec9f876b56938175a63dfc625 (from -r requirements.txt (line 9)) Cloning https://github.com/SysCV/sam-hq (to revision 5fd027ec559806dec9f876b56938175a63dfc625) to /private/var/folders/28/pjfz24p92bxcj5j7gsnnk9xm0000gp/T/pip-install-cmpqwucv/segment-anything-hq_bd753024d0a540f5bcb3225886933667 Running command git clone --filter=blob:none --quiet https://github.com/SysCV/sam-hq /private/var/folders/28/pjfz24p92bxcj5j7gsnnk9xm0000gp/T/pip-install-cmpqwucv/segment-anything-hq_bd753024d0a540f5bcb3225886933667 Running command git rev-parse -q --verify 'sha^5fd027ec559806dec9f876b56938175a63dfc625' Running command git fetch -q https://github.com/SysCV/sam-hq 5fd027ec559806dec9f876b56938175a63dfc625 Resolved https://github.com/SysCV/sam-hq to commit 5fd027ec559806dec9f876b56938175a63dfc625 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done WARNING: Generating metadata for package segment-anything-hq produced metadata for project name segment-anything. Fix your #egg=segment-anything-hq fragments. Discarding git+https://github.com/SysCV/sam-hq@5fd027ec559806dec9f876b56938175a63dfc625: Requested segment-anything from git+https://github.com/SysCV/sam-hq@5fd027ec559806dec9f876b56938175a63dfc625 (from -r requirements.txt (line 9)) has inconsistent name: expected 'segment-anything-hq', but metadata has 'segment-anything' ``` See also: https://github.com/pypa/pipenv/issues/5445#issuecomment-1297014393 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 60e0c6c..2762624 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import find_packages, setup setup( - name="segment_anything", + name="segment-anything-hq", version="1.0", install_requires=[], packages=find_packages(exclude="notebooks"),