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

InvalidRequirement error while installing using pipx #1272

Closed
3 tasks done
29axe opened this issue Dec 9, 2022 · 7 comments
Closed
3 tasks done

InvalidRequirement error while installing using pipx #1272

29axe opened this issue Dec 9, 2022 · 7 comments

Comments

@29axe
Copy link

29axe commented Dec 9, 2022

Confirmation

  • I have read the README.md on the project homepage
  • I have checked if identical issue already exists
  • I have tried downgrading to find version that can be used as a workaround

The problem

I can't install PlexTraktSync using pipx on Win 10.
Tried downgrading versions up to 0.23.14.
Tried python 3.11 and 3.10.
I can't find where this furo requirements come from.

Error trace / logs

PS C:\Users\USER\.local> pipx install PlexTraktSync --verbose
pipx >(setup:757): pipx version is 1.1.0
pipx >(setup:758): Default python interpreter is 'C:\\Program Files\\Python310\\python.exe'
pipx >(mkdir:81): creating directory C:\Users\USER\.local\pipx\venvs
pipx >(mkdir:81): creating directory C:\Users\USER\.local\pipx\.cache
pipx >(package_name_from_spec:323): Determined package name: plextraktsync
pipx >(package_name_from_spec:324): Package name determined in 0.0s
creating virtual environment...
pipx >(run_subprocess:173): running C:\Program Files\Python310\python.exe -m venv --without-pip C:\Users\USER\.local\pipx\venvs\plextraktsync
creating shared libraries...
pipx >(run_subprocess:173): running C:\Program Files\Python310\python.exe -m venv --clear C:\Users\USER\.local\pipx\shared
pipx >(upgrade:91): Upgrading shared libraries in C:\Users\USER\.local\pipx\shared
upgrading shared libraries...
pipx >(run_subprocess:173): running C:\Users\USER\.local\pipx\shared\Scripts\python.exe -m pip --disable-pip-version-check install --force-reinstall --upgrade pip setuptools wheel
pipx >(run_subprocess:173): running C:\Users\USER\.local\pipx\venvs\plextraktsync\Scripts\python.exe -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:173): running C:\Users\USER\.local\pipx\shared\Scripts\python.exe -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:173): running C:\Users\USER\.local\pipx\venvs\plextraktsync\Scripts\python.exe --version
pipx >(_parsed_package_to_package_or_url:128): cleaned package spec: plextraktsync
installing plextraktsync...
pipx >(run_subprocess:173): running C:\Users\USER\.local\pipx\venvs\plextraktsync\Scripts\python.exe -m pip install plextraktsync
pipx >(run_subprocess:173): running <fetch_info_in_venv commands>

pipx >(rmdir:55): removing directory C:\Users\USER\.local\pipx\venvs\plextraktsync
Traceback (most recent call last):
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\packaging\requirements.py", line 35, in __init__
    parsed = parse_requirement(requirement_string)
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\packaging\_parser.py", line 64, in parse_requirement
    return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\packaging\_parser.py", line 82, in _parse_requirement
    url, specifier, marker = _parse_requirement_details(tokenizer)
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\packaging\_parser.py", line 116, in _parse_requirement_details
    specifier = _parse_specifier(tokenizer)
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\packaging\_parser.py", line 203, in _parse_specifier
    with tokenizer.enclosing_tokens("LEFT_PARENTHESIS", "RIGHT_PARENTHESIS"):
  File "C:\Program Files\Python310\lib\contextlib.py", line 142, in __exit__
    next(self.gen)
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\packaging\_tokenizer.py", line 181, in enclosing_tokens
    self.raise_syntax_error(
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\packaging\_tokenizer.py", line 161, in raise_syntax_error
    raise ParserSyntaxError(
packaging._tokenizer.ParserSyntaxError: Expected closing RIGHT_PARENTHESIS
    furo (>=2021.8.17-beta.43,<2022.0.0); extra == "docs"
         ~~~~~~~~~~~~~~^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "c:\users\USER\appdata\roaming\python\python310\scripts\pipx.exe\__main__.py", line 7, in <module>
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\pipx\main.py", line 819, in cli
    return run_pipx_command(parsed_pipx_args)
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\pipx\main.py", line 202, in run_pipx_command
    return commands.install(
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\pipx\commands\install.py", line 60, in install
    venv.install_package(
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\pipx\venv.py", line 244, in install_package
    self._update_package_metadata(
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\pipx\venv.py", line 318, in _update_package_metadata
    venv_package_metadata = self.get_venv_metadata_for_package(
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\pipx\venv.py", line 300, in get_venv_metadata_for_package
    venv_metadata = inspect_venv(
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\pipx\venv_inspect.py", line 251, in inspect_venv
    app_paths_of_dependencies = _dfs_package_apps(
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\pipx\venv_inspect.py", line 142, in _dfs_package_apps
    app_paths_of_dependencies = _dfs_package_apps(
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\pipx\venv_inspect.py", line 121, in _dfs_package_apps
    dependencies = get_package_dependencies(
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\pipx\venv_inspect.py", line 54, in get_package_dependencies
    for req in map(Requirement, dist.requires or []):
  File "C:\Users\USER\AppData\Roaming\Python\Python310\site-packages\packaging\requirements.py", line 37, in __init__
    raise InvalidRequirement(str(e)) from e
packaging.requirements.InvalidRequirement: Expected closing RIGHT_PARENTHESIS
    furo (>=2021.8.17-beta.43,<2022.0.0); extra == "docs"
         ~~~~~~~~~~~~~~^
PS C:\Users\USER\.local>

Expected behavior

Finish installation

Steps to reproduce the behavior

  1. pipx install PlexTraktSync==0.23.14 --verbose

Inspect of problematic items

No response

Workarounds

No response

Install method

pipx

Config file contents

No response

Version

0.24.7

Python Version

3.10.9

Operating System and Version

Windows 10

@glensc
Copy link
Collaborator

glensc commented Dec 9, 2022

I'm guessing https://pypi.org/project/furo/ is installed with pip as system package, what does your pip list say?

you probably should report this to pipx:

@29axe
Copy link
Author

29axe commented Dec 9, 2022

pip list says I have furo 2022.12.7.
But I can install other pipx packages. This error message seems to raise only when trying to install PlexTraktSync.

@glensc
Copy link
Collaborator

glensc commented Dec 9, 2022

uninstall furo from pip, what then?

@glensc
Copy link
Collaborator

glensc commented Dec 9, 2022

Anyway, it's not PlexTraktSync can do anything, so I'm closing it. Feel free to re-open if you found something that from PlexTraktSync we can do.

You can continue discussing if you found something or reported problem elsewhere.

@glensc glensc closed this as completed Dec 9, 2022
@29axe
Copy link
Author

29axe commented Dec 9, 2022

uninstall furo from pip, what then?

Same thing happens.

@29axe
Copy link
Author

29axe commented Dec 9, 2022

Opened an issue on pipx.
pypa/pipx#924 (comment)

@MasothU
Copy link

MasothU commented Dec 9, 2022

EDIT: Just saw the suggested workaround in your pipx issue. Will test it later. Thx for raising the issue at pipx!

I have the same problem (see discussion #1268). Hope pipx Devs find a solution.

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