Skip to content

pkg_resources.DistributionNotFound: The 'wheel<1.0,>=0.23.0' distribution was not found and is required by astunparse #61

@pawamoy

Description

@pawamoy

Hey @simonpercivall, sorry to come bother you here with that, but maybe you'll have an idea on why it's happening?

Basically, upon running mkdocs serve in a manually created virtualenv (python3.8 -m venv env), we get this error.
mkdocs serve builds the site, the mkdocstrings plugin then calls pytkdocs which depends on astunparse.

INFO    -  Building documentation... 
Traceback (most recent call last):
  File "/Users/an/Desktop/mkdocstrings/env/bin/mkdocs", line 10, in <module>
    sys.exit(cli())
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/mkdocs/__main__.py", line 133, in serve_command
    serve.serve(
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 141, in serve
    config = builder()
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/mkdocs/commands/serve.py", line 122, in builder
    config = load_config(
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/mkdocs/config/base.py", line 197, in load_config
    errors, warnings = cfg.validate()
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/mkdocs/config/base.py", line 107, in validate
    run_failed, run_warnings = self._validate()
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/mkdocs/config/base.py", line 62, in _validate
    self[key] = config_option.validate(value)
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/mkdocs/config/config_options.py", line 131, in validate
    return self.run_validation(value)
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/mkdocs/config/config_options.py", line 609, in run_validation
    plgins[item] = self.load_plugin(item, cfg)
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/mkdocs/config/config_options.py", line 617, in load_plugin
    Plugin = self.installed_plugins[name].load()
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2442, in load
    self.require(*args, **kwargs)
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2465, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/Users/an/Desktop/mkdocstrings/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'wheel<1.0,>=0.23.0' distribution was not found and is required by astunparse

Do you have any idea why pkg_resources is complaning? Well, the obvious explanation is that wheel is not installed, but is there some distribution settings on your side possibly involved?

For reference: mkdocstrings/mkdocstrings#262

Metadata

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