[openstack-dev] [diskimage-builder] disk-image-create from virtualenv not working
Alec Hothan (ahothan)
ahothan at cisco.com
Thu Jul 2 17:58:26 UTC 2015
I wonder if anybody else ran into the same issue as it looks like PyYAML
is required on the native python in order for disk-image-crate to succeed.
Installing PyYAML in a virtual environment and running disk-iage-create
from that venv won't work as one of the script fails to import yaml:
dib-run-parts Thu Jul 2 09:27:50 PDT 2015 Running
Traceback (most recent call last):
line 26, in <module>
ImportError: No module named yaml
I added a trace to print sys.path in that script and sure enough, it is
bypassing completely my venv path, it looks like the PATH is not picking
up the existing PATH from the calling shell.
from the same shell that ran disk-iage-create above:
$ pip list | grep YAML
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
Is that a known issue/requirement or is there a workaround (other than
installing pyYAML on the native python?
More information about the OpenStack-dev