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

Invalid version: 'RegionCLIP' #100

Open
DDPYZ opened this issue Aug 15, 2024 · 3 comments
Open

Invalid version: 'RegionCLIP' #100

DDPYZ opened this issue Aug 15, 2024 · 3 comments

Comments

@DDPYZ
Copy link

DDPYZ commented Aug 15, 2024

My friend and I have tried the method in #60 , but still get the error: "pip._vendor.packaging.version.InvalidVersion: Invalid version: 'RegionCLIP'". Has anyone encountered a similar problem?
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Obtaining file:///mnt/d/ZYY/RegionCLIP
Preparing metadata (setup.py) ... done
ERROR: Exception:
Traceback (most recent call last):
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
status = _inner_run()
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run
return self.run(options, args)
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 67, in wrapper
return func(self, options, args)
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 379, in run
requirement_set = resolver.resolve(
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 76, in resolve
collected = self.factory.collect_root_requirements(root_reqs)
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 539, in collect_root_requirements
reqs = list(
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 495, in _make_requirements_from_install_req
cand = self._make_base_candidate_from_link(
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 211, in _make_base_candidate_from_link
self._editable_candidate_cache[link] = EditableCandidate(
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 328, in init
super().init(
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in init
self.dist = self._prepare()
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 235, in _prepare
dist = self._prepare_distribution()
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 338, in _prepare_distribution
return self._factory.preparer.prepare_editable_requirement(self._ireq)
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 698, in prepare_editable_requirement
dist = _get_prepared_distribution(
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 72, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/distributions/sdist.py", line 69, in prepare_distribution_metadata
self.req.prepare_metadata()
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 591, in prepare_metadata
self._set_requirement()
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 394, in _set_requirement
if isinstance(parse_version(self.metadata["Version"]), Version):
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_vendor/packaging/version.py", line 56, in parse
return Version(version)
File "/home/frain/micromamba/envs/region/lib/python3.9/site-packages/pip/_vendor/packaging/version.py", line 202, in init
raise InvalidVersion(f"Invalid version: '{version}'")
pip._vendor.packaging.version.InvalidVersion: Invalid version: 'RegionCLIP'

@leonmayer
Copy link

leonmayer commented Aug 16, 2024

Changing version=get_version() to version='0.1.0' in setup.py fixed it for me.

@DDPYZ
Copy link
Author

DDPYZ commented Aug 21, 2024

Changing version=get_version() to version='0.1.0' in setup.py fixed it for me.

Thank you. Now it worked

@Roccon-Dog
Copy link

Changing version=get_version() to version='0.1.0' in setup.py fixed it for me.

Thank you

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