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 install with pip from pypi #43

Open
zero-stroke opened this issue Jun 11, 2024 · 2 comments
Open

Can't install with pip from pypi #43

zero-stroke opened this issue Jun 11, 2024 · 2 comments

Comments

@zero-stroke
Copy link

zero-stroke commented Jun 11, 2024

When trying pip install brave-search I got this error:

pip install brave-search
Collecting brave-search
Using cached brave_search-0.2.0-py3-none-any.whl.metadata (5.8 kB)
ERROR: Exception:
Traceback (most recent call last):
File "F:\envs\alg11\Lib\site-packages\pip_vendor\packaging\requirements.py", line 102, in init
req = REQUIREMENT.parseString(requirement_string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_vendor\pyparsing\util.py", line 256, in _inner
return fn(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_vendor\pyparsing\core.py", line 1190, in parse_string
raise exc.with_traceback(None)
pip._vendor.pyparsing.exceptions.ParseException: Expected string_end, found '(' (at char 6), (line:1, col:7)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "F:\envs\alg11\Lib\site-packages\pip_internal\cli\base_command.py", line 180, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_internal\cli\req_command.py", line 245, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_internal\commands\install.py", line 377, in run
requirement_set = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 95, in resolve
result = self._result = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 427, in resolve
failure_causes = self._attempt_to_pin_criterion(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 239, in _attempt_to_pin_criterion
criteria = self._get_updated_criteria(candidate)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 229, in _get_updated_criteria
for requirement in self._p.get_dependencies(candidate=candidate):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_internal\resolution\resolvelib\provider.py", line 244, in get_dependencies
return [r for r in candidate.iter_dependencies(with_requires) if r is not None]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_internal\resolution\resolvelib\provider.py", line 244, in
return [r for r in candidate.iter_dependencies(with_requires) if r is not None]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 239, in iter_dependencies
for r in requires:
File "F:\envs\alg11\Lib\site-packages\pip_internal\metadata\importlib_dists.py", line 221, in iter_dependencies
req = Requirement(req_string)
^^^^^^^^^^^^^^^^^^^^^^^
File "F:\envs\alg11\Lib\site-packages\pip_vendor\packaging\requirements.py", line 104, in init
raise InvalidRequirement(
pip._vendor.packaging.requirements.InvalidRequirement: Parse error at "'(>=0.24.'": Expected string_end

This is within a conda environment, I tried with an old one and a new one, neither worked.

I was able to successfully install by instead doing pip install git+https://github.com/kayvane1/brave-api

Windows, python 3.11, pip 24.0

@zero-stroke zero-stroke changed the title Can't install with pip Can't install with pip from pypi Jun 11, 2024
@colintbowers
Copy link

Exact same issue here, and the fix worked for me. Environment is Ubuntu 22.04 LTS, pip 24.0, python 3.10.

@solovieff
Copy link

Same here.

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