Bug 1486612 - [abrt] ansible: ansible:43:<module>:ImportError: No module named 'ansible'
Summary: [abrt] ansible: ansible:43:<module>:ImportError: No module named 'ansible'
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:bb9cccd747e0b4a282c33005fcf...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-30 09:13 UTC by Allan Poulsen
Modified: 2017-08-30 16:50 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-08-30 16:50:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.08 KB, text/plain)
2017-08-30 09:13 UTC, Allan Poulsen
no flags Details
File: environ (5.54 KB, text/plain)
2017-08-30 09:13 UTC, Allan Poulsen
no flags Details

Description Allan Poulsen 2017-08-30 09:13:41 UTC
Description of problem:
Running ansible as suggested here: https://docs.ansible.com/ansible/latest/python_3_support.html results in this exception

Version-Release number of selected component:
ansible-2.3.1.0-1.fc25

Additional info:
reporter:       libreport-2.8.0
cmdline:        python3 /usr/bin/ansible
executable:     /usr/bin/ansible
kernel:         4.12.8-200.fc25.x86_64
pkg_fingerprint: 4089 D8F2 FDB1 9C98
pkg_vendor:     Fedora Project
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
ansible:43:<module>:ImportError: No module named 'ansible'

Traceback (most recent call last):
  File "/usr/bin/ansible", line 43, in <module>
    import ansible.constants as C
ImportError: No module named 'ansible'

Local variables in innermost frame:
__builtins__: <module 'builtins' (built-in)>
absolute_import: _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0), 16384)
os: <module 'os' from '/usr/lib64/python3.5/os.py'>
shutil: <module 'shutil' from '/usr/lib64/python3.5/shutil.py'>
__cached__: None
__loader__: <_frozen_importlib_external.SourceFileLoader object at 0x7f403bf43898>
division: _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)
__package__: None
__file__: '/usr/bin/ansible'
__spec__: None
__doc__: None
traceback: <module 'traceback' from '/usr/lib64/python3.5/traceback.py'>
__requires__: ['ansible']
__metaclass__: <class 'type'>
__name__: '__main__'
sys: <module 'sys' (built-in)>
print_function: _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536)
Lock: <bound method BaseContext.Lock of <multiprocessing.context.DefaultContext object at 0x7f402fa52f98>>

Comment 1 Allan Poulsen 2017-08-30 09:13:48 UTC
Created attachment 1319947 [details]
File: backtrace

Comment 2 Allan Poulsen 2017-08-30 09:13:50 UTC
Created attachment 1319948 [details]
File: environ

Comment 3 Toshio Kuratomi 2017-08-30 16:50:38 UTC
On Fedora you will need to have the ansible-python3 package installed.  (and can then use /usr/bin/ansible-3 ).  I'll try to make the upstream docs more clear that they are for use with a source checkout and that individual distros might have other ways to use it with Python3.


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