Bug 1004384 - jinja2 not in import path after installation
Summary: jinja2 not in import path after installation
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-jinja2-26
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Thomas Moschny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-04 14:10 UTC by Bowe Strickland
Modified: 2013-09-04 14:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-04 14:46:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Bowe Strickland 2013-09-04 14:10:11 UTC
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
/usr/lib/python2.6/site-packages
[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 14:46:48 UTC
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
  RHEL6.

  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
  https://fedoraproject.org/wiki/Packaging:Python_Eggs#Multiple_Versions

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.