Bug 1004384 - jinja2 not in import path after installation
jinja2 not in import path after installation
Product: Fedora EPEL
Classification: Fedora
Component: python-jinja2-26 (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Thomas Moschny
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-09-04 10:10 EDT by Bowe Strickland
Modified: 2013-09-04 10:46 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-04 10:46:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bowe Strickland 2013-09-04 10:10:11 EDT
Description of problem:

After installation of python-jinja2-26-2.6-2.el6.noarch, python "import jinja2" fails.

I resolved by creating a jinja2 symlink which resolved into the egg directory:

[root@node20 site-packages]# pwd
[root@node20 site-packages]# ll jinja2
lrwxrwxrwx. 1 root root 27 Sep  4 10:03 jinja2 -> Jinja2-2.6-py2.6.egg/jinja2

A more appropriate solution would probably be including an appropriate .pth file
with the package.
Comment 1 Thomas Moschny 2013-09-04 10:46:48 EDT
This is on purpose, because a different (older) version of Jinja2 is contained in RHEL6.

Quoting the README.Fedora contained in python-jinja2-26-2.6-2.el6:

  This is a package of the Jinja2-2.6.X series for EPEL6. It is designed
  to be parallel-installable with the version of Sphinx that ships with

  In order to import the module, you have to modify sys.path as such:

  >>> import sys
  >>> sys.path.insert(0, '/usr/lib/python2.6/site-packages/Jinja2-2.6-py2.6.egg')
  >>> import jinja2

  For more details, see

Unfortunately this text contains a bug, talking of 'Sphinx' instead of 'Jinja2', but you get the idea.

Note You need to log in before you can comment on or make changes to this bug.