Bug 1124299

Summary: virtualenvwrapper.sh: There was a problem running the initialization hooks.
Product: Red Hat Software Collections Reporter: Alexander Todorov <atodorov>
Component: python-virtualenvAssignee: Python Maintainers <python-maint>
Status: CLOSED NOTABUG QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: high Docs Contact:
Priority: high    
Version: python33CC: bkabrda
Target Milestone: rc   
Target Release: 1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-30 09:04:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexander Todorov 2014-07-29 08:05:15 UTC
Description of problem:


$ scl enable python33 bash
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named 'virtualenvwrapper'
virtualenvwrapper.sh: There was a problem running the initialization hooks. 

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/opt/rh/python33/root/usr/bin/python and that PATH is
set properly.

$ exit


Same with 2.7 as well:

$ scl enable python27 bash
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named virtualenvwrapper.hook_loader
virtualenvwrapper.sh: There was a problem running the initialization hooks. 

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/opt/rh/python27/root/usr/bin/python and that PATH is
set properly.

$ exit


$ rpm -q python27 python33
python27-1.1-16.el6.x86_64
python33-1.1-12.el6.x86_64


$ rpm -qa | grep virtualenv | sort
python27-python-virtualenv-1.10.1-2.el6.noarch
python33-python-virtualenv-1.10.1-1.el6.noarch
python-virtualenv-1.10.1-1.el6.noarch
python-virtualenv-clone-0.2.4-1.el6.noarch
python-virtualenvcontext-0.1.6-1.el6.noarch
python-virtualenvwrapper-3.5-2.el6.noarch




Do you want me to clone this bug to the -python27 component as well ?

Comment 1 Bohuslav "Slavek" Kabrda 2014-07-29 08:43:53 UTC
System virtualenvwrapper is not supposed to work with collections - it's not even packaged in base RHEL AFAIK. Did you try installing virtualenvwrapper *inside* the collection with easy_install? Unless you can reproduce this bug with virtualenv wrapper installed in collection, I'll probably close this as notabug.

Comment 2 Alexander Todorov 2014-07-30 09:04:48 UTC
Hi Bohuslav,
this is the virtualenvwrapper.sh from outside the collection, which is coming from EPEL. 

On a fresh install with just the python33 collection installed everything works as expected.