Issues with packaging library, unable to install via pipx
valerable opened this issue · comments
Running Kali 2023.1 and python 3.11
I tried installing via pipx using the following
sudo apt install pipx -y
pipx install git+https://github.com/blacklanternsecurity/MANSPIDER
I get this error during the installation
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/packaging/requirements.py", line 35, in __init__
parsed = parse_requirement(requirement_string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/packaging/_parser.py", line 64, in parse_requirement
return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/packaging/_parser.py", line 82, in _parse_requirement
url, specifier, marker = _parse_requirement_details(tokenizer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/packaging/_parser.py", line 120, in _parse_requirement_details
specifier = _parse_specifier(tokenizer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/packaging/_parser.py", line 206, in _parse_specifier
with tokenizer.enclosing_tokens("LEFT_PARENTHESIS", "RIGHT_PARENTHESIS"):
File "/usr/lib/python3.11/contextlib.py", line 144, in __exit__
next(self.gen)
File "/usr/lib/python3/dist-packages/packaging/_tokenizer.py", line 183, in enclosing_tokens
self.raise_syntax_error(
File "/usr/lib/python3/dist-packages/packaging/_tokenizer.py", line 163, in raise_syntax_error
raise ParserSyntaxError(
packaging._tokenizer.ParserSyntaxError: Expected closing RIGHT_PARENTHESIS
extract-msg (<=0.29.*)
~~~~~~~^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/bin/pipx", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/lib/python3/dist-packages/pipx/main.py", line 819, in cli
return run_pipx_command(parsed_pipx_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/main.py", line 202, in run_pipx_command
return commands.install(
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/commands/install.py", line 60, in install
venv.install_package(
File "/usr/lib/python3/dist-packages/pipx/venv.py", line 244, in install_package
self._update_package_metadata(
File "/usr/lib/python3/dist-packages/pipx/venv.py", line 318, in _update_package_metadata
venv_package_metadata = self.get_venv_metadata_for_package(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/venv.py", line 300, in get_venv_metadata_for_package
venv_metadata = inspect_venv(
^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/venv_inspect.py", line 251, in inspect_venv
app_paths_of_dependencies = _dfs_package_apps(
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/venv_inspect.py", line 142, in _dfs_package_apps
app_paths_of_dependencies = _dfs_package_apps(
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/venv_inspect.py", line 121, in _dfs_package_apps
dependencies = get_package_dependencies(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/venv_inspect.py", line 54, in get_package_dependencies
for req in map(Requirement, dist.requires or []):
File "/usr/lib/python3/dist-packages/packaging/requirements.py", line 37, in __init__
raise InvalidRequirement(str(e)) from e
packaging.requirements.InvalidRequirement: Expected closing RIGHT_PARENTHESIS
extract-msg (<=0.29.*)
~~~~~~~^
Is this an issue with the packaging library, and if so, can this be fixed to support later versions?
Just wanted to add a "happening to me too" so I get updates :-). I'm running a brand new Kali with all apt updates and nothing but Manspider.
+1
This seems to happen with other packages as well, see for example facebookresearch/fairseq#5055
+1
Also experiencing this issue as well.
+1
seems to be an issue with the latest Kali distro
This might not be an issue the maintainers of MANSPIDER can fix; it's the packaging
package's fault (https://pypi.org/project/packaging/).
Workaround:
$ pip install pipx
$ pip install packaging==20.0
$ pipx install git+https://github.com/blacklanternsecurity/MANSPIDER
$ ~/.local/bin/manspider
Happy Hacking!
Thanks all for your patience. This was due to an issue in our upstream dependency textract
, which has fallen into disrepair. There is a PR open that fixes this but until it gets merged we have switched to a different fork. This was implemented in 0dc16db.