mondeja / mdpo

Markdown files translation using GNU PO files
https://mondeja.github.io/mdpo/
BSD 3-Clause "New" or "Revised" License
25 stars 6 forks source link

Error installing mdpo #180

Closed keunes closed 2 years ago

keunes commented 2 years ago

Hello @mondeja,

Thank you again for the support - I'm creating a separate issue about my installation issue, so the conversation in #169 remains clean for the AntennaPod maintainer when he has a look. I have installed Python 3 using the deadsnakes ppa, and now am on version 3.6.9.

Please see here the output of the installation process:

$ sudo -H python3 -m pip install mdpo
[sudo] wachtwoord voor glotzbach: 
Sorry, probeer opnieuw
[sudo] wachtwoord voor glotzbach: 
Collecting mdpo
  Downloading https://files.pythonhosted.org/packages/db/0d/386157adab66578ba6a2e5cccf87fce9ee45eef7aeb757069e4ea229aee2/mdpo-0.3.73-py3-none-any.whl (49kB)
    100% |████████████████████████████████| 51kB 1.4MB/s 
Collecting polib>=1.1.0 (from mdpo)
  Downloading https://files.pythonhosted.org/packages/9e/ee/54d6c558d4319a26145658584acb373d50ba0968eb9c19fedfb42458314a/polib-1.1.1-py2.py3-none-any.whl
Collecting pymd4c==1.1.1 (from mdpo)
  Using cached https://files.pythonhosted.org/packages/ae/7c/154eea1a02c6340d14e919a3d803c9e268e3cc7d3a00821a362b071c9319/pymd4c-1.1.1.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/pymd4c.egg-info
    writing pip-egg-info/pymd4c.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/pymd4c.egg-info/dependency_links.txt
    writing requirements to pip-egg-info/pymd4c.egg-info/requires.txt
    /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-mc4m1t4t/pymd4c/setup.py", line 131, in <module>
        **about
      File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 271, in run
        writer(self, ep.name, os.path.join(self.egg_info, ep.name))
      File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 649, in write_toplevel_names
        for k in cmd.distribution.iter_distribution_names()
      File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 648, in <listcomp>
        k.split('.', 1)[0]
      File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 874, in iter_distribution_names
        for ext in self.ext_modules or ():
      File "/tmp/pip-build-mc4m1t4t/pymd4c/setup.py", line 61, in __iter__
        self._fetch_pkgconfig_all()
      File "/tmp/pip-build-mc4m1t4t/pymd4c/setup.py", line 55, in _fetch_pkgconfig_all
        super().append(self._fetch_pkgconfig(extension))
      File "/tmp/pip-build-mc4m1t4t/pymd4c/setup.py", line 38, in _fetch_pkgconfig
        for k, v in pkgconfig.parse(libs).items():
      File "/tmp/pip-build-mc4m1t4t/pymd4c/.eggs/pkgconfig-1.5.5-py3.6.egg/pkgconfig/pkgconfig.py", line 248, in parse
        _raise_if_not_exists(package)
      File "/tmp/pip-build-mc4m1t4t/pymd4c/.eggs/pkgconfig-1.5.5-py3.6.egg/pkgconfig/pkgconfig.py", line 103, in _raise_if_not_exists
        raise PackageNotFoundError(package)
    pkgconfig.pkgconfig.PackageNotFoundError: md4c not found

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-mc4m1t4t/pymd4c/

I'm on a (too) old Ubuntu version, so I wouldn't be surprised if this usage is not supported.

mondeja commented 2 years ago
keunes commented 2 years ago
mondeja commented 2 years ago

It seems that your Ubuntu 18.04 build doesn't include wheel by default. Try with pip install wheel or sudo apt-get install -y python-wheel before install mdpo to satisfy a PEP 427 installation.

keunes commented 2 years ago

Thanks @mondeja for looking into this. It seems that, unfortunately, that wasn't the issue:

$ sudo -H python3 -m pip install wheel
[sudo] wachtwoord voor keunes: 
Requirement already satisfied: wheel in /usr/lib/python3/dist-packages
$ sudo apt install python-wheel
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd       
De statusinformatie wordt gelezen... Klaar
python-wheel is reeds de nieuwste versie (0.30.0-0.2).
python-wheel staat ingesteld op handmatig geïnstalleerd.
0 opgewaardeerd, 0 nieuw geïnstalleerd, 0 te verwijderen en 7 niet opgewaardeerd.
mondeja commented 2 years ago

🤔 It seems that maybe wheel needs to be updated, your version is 0.30.0, try sudo -H python3 -m pip install -U wheel.

If doesn't work, try updating pip. sudo -H python3 -m pip install -U pip

If doesn't work, try updating setuptools. sudo -H python3 -m pip install -U setuptools

Here Ubuntu 18.04 successfully installs mdpo for Python3.6 with wheel==0.37.0, setuptools==40.6.2 and pip==21.3.1.

keunes commented 2 years ago

Awesome, updating (wheel and) pip did the trick. Thanks! Now I can start experimenting with mdpo :D