Hi All,

Just launched an instance with Amazon Linux 2015.03 image, added 
epel-release repository and run "yum install ansible". All went fine so far.
Now when I try to run "ansible" or "ansible-playbook" from command line I 
get this error:
Error:
Traceback (most recent call last):
  File "./ansible", line 26, in <module>
    import ansible.runner
ImportError: No module named ansible.runner

I found that yum installs ansible libraries under 
/usr/lib64/python2.6/site-packages/ while the default python version in 
system (reported through "python --version") is Python 2.7.9 so it seems to 
be expected under /usr/lib64/python2.7/site-packages/ ... but it's not 
there.

$ alternatives --display python
python - status is auto.
 link currently points to /usr/bin/python2.7
/usr/bin/python2.7 - priority 27000
 slave asadmin: /usr/bin/asadmin-2.7
 slave bundle_image: /usr/bin/bundle_image-2.7
 slave cfadmin: /usr/bin/cfadmin-2.7
 slave cq: /usr/bin/cq-2.7
 slave cwutil: /usr/bin/cwutil-2.7
 slave dynamodb_dump: /usr/bin/dynamodb_dump-2.7
 slave dynamodb_load: /usr/bin/dynamodb_load-2.7
 slave easy_install: /usr/bin/easy_install-2.7
 slave elbadmin: /usr/bin/elbadmin-2.7
 slave fetch_file: /usr/bin/fetch_file-2.7
 slave glacier: /usr/bin/glacier-2.7
 slave instance_events: /usr/bin/instance_events-2.7
 slave jp: /usr/bin/jp.py-2.7
 slave jp.py: /usr/bin/jp.py-2.7
 slave kill_instance: /usr/bin/kill_instance-2.7
 slave launch_instance: /usr/bin/launch_instance-2.7
 slave list_instances: /usr/bin/list_instances-2.7
 slave lss3: /usr/bin/lss3-2.7
 slave mturk: /usr/bin/mturk-2.7
 slave pip: /usr/bin/pip-2.7
 slave pyami_sendmail: /usr/bin/pyami_sendmail-2.7
 slave pybabel: /usr/bin/pybabel-2.7
 slave pydoc: /usr/bin/pydoc2.7
 slave pystache: /usr/bin/pystache-2.7
 slave pystache-test: /usr/bin/pystache-test-2.7
 slave python-config: /usr/bin/python2.7-config
 slave route53: /usr/bin/route53-2.7
 slave rst2html: /usr/bin/rst2html-2.7
 slave rst2latex: /usr/bin/rst2latex-2.7
 slave rst2man: /usr/bin/rst2man-2.7
 slave rst2odt: /usr/bin/rst2odt-2.7
 slave rst2odt_prepstyles: /usr/bin/rst2odt_prepstyles-2.7
 slave rst2pseudoxml: /usr/bin/rst2pseudoxml-2.7
 slave rst2s5: /usr/bin/rst2s5-2.7
 slave rst2xetex: /usr/bin/rst2xetex-2.7
 slave rst2xml: /usr/bin/rst2xml-2.7
 slave rstpep2html: /usr/bin/rstpep2html-2.7
 slave s3put: /usr/bin/s3put-2.7
 slave sdbadmin: /usr/bin/sdbadmin-2.7
 slave taskadmin: /usr/bin/taskadmin-2.7
 slave urlgrabber: /usr/bin/urlgrabber-2.7
 slave virtualenv: /usr/bin/virtualenv-2.7
 slave python.1.gz: /usr/share/man/man1/python2.7.1.gz
/usr/bin/python2.6 - priority 2600
 slave asadmin: (null)
 slave bundle_image: (null)
 slave cfadmin: (null)
 slave cq: (null)
 slave cwutil: (null)
 slave dynamodb_dump: (null)
 slave dynamodb_load: (null)
 slave easy_install: /usr/bin/easy_install-2.6
 slave elbadmin: (null)
 slave fetch_file: (null)
 slave glacier: (null)
 slave instance_events: (null)
 slave jp: (null)
 slave jp.py: (null)
 slave kill_instance: (null)
 slave launch_instance: (null)
 slave list_instances: (null)
 slave lss3: (null)
 slave mturk: (null)
 slave pip: (null)
 slave pyami_sendmail: (null)
 slave pybabel: /usr/bin/pybabel-2.6
 slave pydoc: /usr/bin/pydoc2.6
 slave pystache: (null)
 slave pystache-test: (null)
 slave python-config: (null)
 slave route53: (null)
 slave rst2html: (null)
 slave rst2latex: (null)
 slave rst2man: (null)
 slave rst2odt: (null)
 slave rst2odt_prepstyles: (null)
 slave rst2pseudoxml: (null)
 slave rst2s5: (null)
 slave rst2xetex: (null)
 slave rst2xml: (null)
 slave rstpep2html: (null)
 slave s3put: (null)
 slave sdbadmin: (null)
 slave taskadmin: (null)
 slave urlgrabber: (null)
 slave virtualenv: (null)
 slave python.1.gz: /usr/share/man/man1/python2.6.1.gz
Current `best' version is /usr/bin/python2.7.


Is this expected behaviour? Why it installs under old version of python?

Thanks in advance,
Constantin

 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/15f940b9-fc0a-4916-8757-af24972052cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to