Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jinja install for python

I don't use Python regularly, but now I have to. I should run a python sctipt that need Jinja. Python2.7 is installed on my Windows XP and works, but I can't find how to install inja package.

Would anybody be so kind to write me a step by step install guide for it?

I have to run this only once to create some outputs for me, so I don't want tp ddep dive into it, so pls. forgive me if it is a very beginner level question.

Thx

like image 496
Tom Avatar asked Jul 17 '11 21:07

Tom


People also ask

Can you use Python in Jinja?

Using a Python function in a Jinja template First we define 2 functions: 'hello_world' and 'multiply'. These functions are placed in a dictionary. After this, the render function is created. Inside this function, we use jinja_template.

How do I use Jinja in Pycharm?

Preferences > Languages and Frameworks > Template Languages. Select “Jinja2” for the Template Language dropdown at the top, Click on the “+” icon to add SQL (and YAML) to the list. Hit Apply or OK and you are done!

How do I download Jinja in Visual Studio?

First, you will need to install Visual Studio Code 0.10 . In the command palette ( cmd-shift-p ) select Install Extension and choose Jinja . The downside of the Jinja language is that there is no defined file extension and as such, there is no way to detect it automatically in all cases.


2 Answers

have a look at this. You can use setuptools or pip to install jinja. Just enter those command into a DOS prompt

easy_install Jinja2

or

pip install Jinja2

You should have easy_install.exe bundled with your python on windows

Hope this helps

like image 72
wezzy Avatar answered Oct 05 '22 08:10

wezzy


I needed to install jinja2 as a dependency for Ansible and didn't want to use pip or pip3. Installing python-jinja2 package did the trick:

apt install python-jinja2
like image 30
rtrigo Avatar answered Oct 05 '22 08:10

rtrigo