mkdocs-material: Error: Unrecognised theme 'material'

Guys i am trying to use this great looking material theme. As mentioned in instructions i did installation and setup like this.

  • pip install mkdocs-material
  • Added theme: 'material' in mkdocs.yml
  • Restarted mkdocs serve

Browser did’nt got updated with material theme, instead i am getting this in mkdocs serve logs. Can you please help

INFO    -  Building documentation...
ERROR   -  Config value: 'theme'. Error: Unrecognised theme 'material'. The available installed themesare:
[E 161010 01:48:04 ioloop:633] Exception in callback <bound method type.poll_tasks of <class 'livereload.handlers.LiveReloadHandler'>>
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/site-packages/tornado/ioloop.py", line 1041, in _run
        return self.callback()
      File "/usr/local/lib/python2.7/site-packages/livereload/handlers.py", line 66, in poll_tasks
        filepath, delay = cls.watcher.examine()
      File "/usr/local/lib/python2.7/site-packages/livereload/watcher.py", line 73, in examine
        func and func()
      File "/usr/local/lib/python2.7/site-packages/mkdocs/commands/serve.py", line 71, in builder
        theme=theme,
      File "/usr/local/lib/python2.7/site-packages/mkdocs/config/base.py", line 164, in load_config
        "Aborted with {0} Configuration Errors!".format(len(errors))
    ConfigurationError: Aborted with 1 Configuration Errors!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 26 (8 by maintainers)

Commits related to this issue

Most upvoted comments

SOLVED!

@JerryC8080 thank you so much for your help.

I had at some point installed mkdocs via Homebrew and later switched to the pip install. Somewhere my config paths had become mixed up.

Solution:

$ brew uninstall --force mkdocs
$ pip uninstall mkdocs
$ pip install mkdocs

@ksingh7 @g0dlight

Your are suggested to make mkdocs and meterial on the save way.
Such as both installed by pip.

I meet the same problem when I installed mkdocs by brew install mkdocs and meterial by pip install mkdocs-meterial.

We can see the differ of variable theme_dir that mkdocs on different way installed.

On My Device:
On brew install mkdocs

$ mkdocs -v build
......
DEBUG   -  Config value: 'theme_dir' = ['/usr/local/Cellar/mkdocs/0.16.1_1/libexec/lib/python2.7/site-packages/mkdocs/themes/mkdocs', u'/usr/local/Cellar/mkdocs/0.16.1_1/libexec/lib/python2.7/site-packages/mkdocs/assets/search']
...

On pip install mkdocs

$ mkdocs -v build
...
DEBUG   -  Config value: 'theme_dir' = ['/usr/local/lib/python2.7/site-packages/mkdocs/themes/mkdocs', u'/usr/local/lib/python2.7/site-packages/mkdocs/assets/search']
...

And pip install mkdocs-meterial

$ pip install mkdocs-material

Requirement already satisfied: mkdocs-material in /usr/local/lib/python2.7/site-packages

So, Make mkdocs and themes install in the save directory. Because mkdocs build and mkdocs serve command will load the same level directory to find theme.

Hope the way i solve my problem will be same on you.

SOLVED!

In the mkdocs.yml file, you should change this line as follows:

theme:
  name: 'material'

to this version,

theme:
  name: 'mkdocs'

OR

theme:
  name: 'readthedocs'