Jinja install for python

家住魔仙堡 提交于 2019-12-12 10:36:59

问题


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


回答1:


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




回答2:


For updates (git path) see: http://jinja.pocoo.org/docs/dev/intro/

git clone git://github.com/mitsuhiko/jinja2.git
cd jinja2
sudo
cp -r jinja2 /usr/lib/python2.X/site-packages
exit

Note: The jinja2 subdirectory in jinja2 already includeds all the files packaged as a python library and is ready for your /usr/lib...



来源:https://stackoverflow.com/questions/6726983/jinja-install-for-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!