mkdocs-awesome-pages-plugin
mkdocs-awesome-pages-plugin copied to clipboard
Installation was successful, but MKDOCS server spits out the error "plugin is not installed"
On my MAC, I have both Python version 2.7 and Python version 3.11.5. I tried installing using the default command:
pip install mkdocs-awesome-pages-plugin
That failed, of course, because my Python version 2.7 support has been deprecated.
So I used the following command to successfully install the awsome-pages plugin:
python3 -m pip install mkdocs-awesome-pages-plugin
However, MKDOCS SERVE gives me the following error Error: The "awesome-pages" plugin is not installed
I even ran a reinstall of mkdocs-awesome-pages-plugin
and the terminal came back with a list of requirements that are "already satisfied", confirming that the plugin is installed.
Need some help here, as I do not normally involve myself in coding, so I'm at a loss as to what to do next!
My first guess is that the plugin is installed in a different location than mkdocs itself. Run the following command to print all packages that are installed alongside the plugin:
python3 -m pip freeze
This is the list: bracex==2.3.post1 click==8.1.7 ghp-import==2.1.0 Jinja2==3.1.2 Markdown==3.4.4 MarkupSafe==2.1.3 mergedeep==1.3.4 mkdocs==1.5.2 mkdocs-awesome-pages-plugin==2.9.2 natsort==8.4.0 packaging==23.1 pathspec==0.11.2 platformdirs==3.10.0 python-dateutil==2.8.2 PyYAML==6.0.1 pyyaml_env_tag==0.1 six==1.16.0 watchdog==3.0.0 wcmatch==8.4.1
I recommend using a Virtual Environment to have a better control of the packages.
But anyways looking at the pip freeze it seems that both MkDocs and the plugin are installed in the same pip environment.
Try running python3 -m mkdocs
instead of just mkdocs
or make sure that the MkDocs in python 2 is uninstalled.
I ran the following command:
python2 pip uninstall mkdocs
and successfully removed mkdocs from version 2
Still, though, running mkdocs serve
works as long as I have the awesome-pages plugin commented out.
Sooooo, I tried your other suggestion to run python3 -m mkdocs serve
and received the following errors:
Traceback (most recent call last):
File "
kamilkrzyskow, what kind of virtual environment do you recommend when you say virtual environment? Perhaps Docker with a mapped volume for the documentation?
@surfingjoe I mean the most simple, python3 -m venv venv
(using the venv module to create a venv directory) then activating it.
I guess on Mac it's source venv/bin/activate
but you'd better double check that.
I don't use Docker or any Conda environment overlay.
After the activation your terminal should show (venv) and then every pip install command will install packages into that virtual environment.
kamilkrzyskow, I will give that a shot. I'm for learning something new every day and that sounds very handy!
Thanks @kamilkrzyskow for helping out here, virtual environments are definitely the way to go 👍
@surfingjoe Please also post the contents of your mkdocs.yml
. The latest error you've posted looks like mkdocs/mkdocs#3351 which happens when the theme is invalid (e.g. not installed).
It took me a while to get the chance to go back to this today. Good News I originally still had a problem with Python 2.7 installed when running the virtual environment, "error 2.7 deprecated." So, I completely removed Python using the following article. Hint: I removed both Python 2.7 and Python 3.11 and all links to them.
I then installed only Python3. Then, I used PIP3 to install virtualenv, MKDOCS, Windmill theme, and awesome-pages-plugin. Then I ran the instructions to launch Venv found in this article.
kamilkrzyskow Thank You so much, I learned something valuable from using the virtual environment. Makes a cleaner use of MKDOCS by far!!
Wait, when reading this in order you installed virtualenv, the theme, MkDocs and the plugin and only after that activated the virtual environment?
If so that's not the right order, you activate the virtual environment and then install the packages so that they're isolated in that environment. Otherwise you installed everything globally.
If you like your virtualenv
then you can stick with it, but I will reiterate that I meant the default already built-in method.
https://devdocs.io/python~3.11/library/venv
kamilkrzyskow - Sorry, I must've mis-phrased something. I activated virtualenv before installing MKDOCS, Windmill theme, and awesome-pages-plugin.
I will check the method mentioned by your link above.
Thank You!