getnikola / nikola

A static website and blog generator
https://getnikola.com/
MIT License
2.6k stars 445 forks source link

Nikola fails to detect Jinja2 #3622

Closed ChillarAnand closed 2 years ago

ChillarAnand commented 2 years ago

Environment

Python Version: 3.8

Nikola Version: 8.2.2

Operating System: MacOS

Description:

Unable to use Jinja based themes as Nikola is not able to find Jinja.

Screenshot 2022-05-07 at 19 37 41
ralsina commented 2 years ago

Is it possible that nikola was installed in a virtualenv or something like that which doesn't have jinja2 installed?

ChillarAnand commented 2 years ago

Initially I thought the same but after quick verification, it doesn't seem to be the case.

Screenshot 2022-05-09 at 21 11 20
Kwpolska commented 2 years ago

@ChillarAnand Does the same thing occur when you run python -m nikola? Can you import jinja2 in the python REPL?

(Also, we recommend using virtual environments.)

ChillarAnand commented 2 years ago

As shown in the above screenshot, Jinja==2.1.1 got installed somehow. It is unsupported. Upgrading Jinja2 fixed the issue.

Screenshot 2022-05-14 at 06 42 56

Thanks, @Kwpolska, @ralsina