A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Python-Markdown/markdown/issues/825 below:

markdown does not import on ArchLinux · Issue #825 · Python-Markdown/markdown · GitHub

I am forwarding here the bug I have received in retext-project/retext#458:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
    import markdown
  File "/usr/lib/python3.7/site-packages/markdown/__init__.py", line 67, in <module>
    __version__ = _get_version()
  File "/usr/lib/python3.7/site-packages/markdown/__init__.py", line 64, in _get_version
    return str(packaging.version.Version(v))
AttributeError: module 'pkg_resources._vendor.packaging' has no attribute 'version'

I looked at ArchLinux PKGBUILD file and found out that they are patching setuptools to use system versions of modules such as packaging, instead of vendored versions:

https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/python-setuptools#n26

Now I realized that pkg_resources.extern.packaging is a non-documented module, and we cannot be sure that it exists on all platforms or that it will not be removed in the future. So probably we should switch to the official version of packaging or at least do something like this:

try:
    import packaging
except ImportError:
    from pkg_resources.extern import packaging

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4