Skip to content

pip install argparse-manpage fails on RHEL8 with system pip3 #96

Open
@vashirov

Description

$ pip3 --version
pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)

$ pip3 install --user argparse-manpage
Collecting argparse-manpage
  Using cached https://files.pythonhosted.org/packages/d3/5f/3353e1dd33fcb3801cfe7e6412ad9d75202fc642679d105015e361aceef7/argparse-manpage-4.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "/tmp/pip-build-dwy7230y/argparse-manpage/build_manpages/build_manpages.py", line 10, in <module>
        import tomllib
    ModuleNotFoundError: No module named 'tomllib'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/tmp/pip-build-dwy7230y/argparse-manpage/build_manpages/build_manpages.py", line 14, in <module>
        import tomli as tomllib
    ModuleNotFoundError: No module named 'tomli'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-dwy7230y/argparse-manpage/setup.py", line 11, in <module>
        from build_manpages import __version__
      File "/tmp/pip-build-dwy7230y/argparse-manpage/build_manpages/__init__.py", line 6, in <module>
        from .build_manpages import build_manpages, get_build_py_cmd, get_install_cmd
      File "/tmp/pip-build-dwy7230y/argparse-manpage/build_manpages/build_manpages.py", line 17, in <module>
        import toml as tomllib
    ModuleNotFoundError: No module named 'toml'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-dwy7230y/argparse-manpage/

It installs fine in venv and latest versions of pip (at least starting with python38-pip-19.3.). So I suspect that pip-9.0.3 can't handle unresolved dependencies while importing build_manpages in setup.py:

from build_manpages import __version__

if sys.version_info >= (3,):
install_requires = ['tomli;python_version<"3.11"']
else:
install_requires = ['toml']

try:
import tomllib
from tomllib import TOMLDecodeError
except ImportError:
try:
import tomli as tomllib
from tomli import TOMLDecodeError
except ImportError:
import toml as tomllib
from toml import TomlDecodeError as TOMLDecodeError

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions