dependency issue: python-mistune
atomGit opened this issue · comments
arch/manjaro linux
i have python-mistune v2.0.4-1 installed and...
$ lektor --help
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 581, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 909, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 800, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (mistune 2.0.4 (/usr/lib/python3.10/site-packages), Requirement.parse('mistune<2,>=0.7.0'), {'Lektor'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/lektor", line 33, in <module>
sys.exit(load_entry_point('Lektor==3.2.0', 'console_scripts', 'lektor')())
File "/usr/bin/lektor", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/lektor/cli.py", line 8, in <module>
import pkg_resources
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3260, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 583, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 795, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'mistune<2,>=0.7.0' distribution was not found and is required by Lektor
Lektor 3.2 is really quite old.
You'll have better luck running Lektor from a virtual environment. Pipx might make this easier.
That said, Lektor 3.3.x (the current stable branch) does not work with mistune 2.
The code in the master branch does. There are pre-releases of this on PyPI. The latest, as of now, is lektor==3.4.0b4.
(You can install this by explicitly specifying the revision to pip, or by giving pip the --pre
option.)
pip says no such option: --pre
and i'm not seeing any other option that would deal with versions
pip says
no such option: --pre
and i'm not seeing any other option that would deal with versions
@atomGit
--pre
is an option to the install
subcommand of pip
pip install --pre lektor
Docs here: https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-pre
Alternatively, you can specify the exact version to install:
pip install lektor==3.4.0b4
thanks