pkg_resources.DistributionNotFound: The 'wheel<1.0,>=0.23.0' distribution was not found and is required by astunparse
pawamoy opened this issue ยท 6 comments
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
No good idea why it's so, wheel
should be installed by pip, unless there's something wrong with the way astunparse
has been installed.
On the other hand, wheel
shouldn't be an installation requirement, I should just remove it from there.
Maybe Poetry is not installing wheel in the venv because it assumes the venv was created by itself, using virtualenv, and hence wheel would be installed already.
If you can remove the dependency to wheel and push a new release, it would be nice ๐
I can send the PR with the one-line diff if you want! ๐
Looks like you never merged #65. I'll close this issue anyway. Thanks for your help ๐
Yeah, sorry, my priorities have had to shift, in addition to this package being less important in the 3.9+ world.
No worries! I just did some clean up yesterday, closing lots of old issues :)