Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When built from source, ansible --version errors with "ImportError: No module named _text" #20088

Closed
vielmetti opened this issue Jan 10, 2017 · 1 comment
Labels
affects_2.3 This issue/PR affects Ansible v2.3 bug This issue/PR relates to a bug.

Comments

@vielmetti
Copy link

vielmetti commented Jan 10, 2017

ISSUE TYPE
  • Bug Report
COMPONENT NAME

Ansible main program

ANSIBLE VERSION
root@docker-build-test:/mnt/src/ansible/ansible/bin# ./ansible --version
Traceback (most recent call last):
  File "./ansible", line 46, in <module>
    from ansible.module_utils._text import to_text
ImportError: No module named _text

CONFIGURATION

Building ansible from source. There is a system ansible installed, v2.0.0.2 installed from Ubuntu 16.04 for aarch64 .

OS / ENVIRONMENT

Ubuntu 16.04 on ARMv8 (aarch64) on 96-core server on Packet.net

SUMMARY

After I installed a bunch of test dependencies, all tests pass; but when I try to run ansible --version from the bin/ directory of the distribution, that fails.

A similar bug identified (though not exactly the same) is #18582.

STEPS TO REPRODUCE

Pull the current distribution from github, this is on origin/devel.

# git status
On branch devel
Your branch is up-to-date with 'origin/devel'.
EXPECTED RESULTS

I expected ansible --version to print the version number.

ACTUAL RESULTS
root@docker-build-test:/mnt/src/ansible/ansible/bin# ./ansible -vvvv  --version
Traceback (most recent call last):
  File "./ansible", line 46, in <module>
    from ansible.module_utils._text import to_text
ImportError: No module named _text

@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 bug_report needs_triage Needs a first human triage before being processed. labels Jan 10, 2017
@vielmetti vielmetti changed the title #18582 When built from source, ansible --version errors with "ImportError: No module named _text" Jan 10, 2017
@abadger
Copy link
Contributor

abadger commented Jan 11, 2017

This is a duplicate of #18582. The bin/ansible script that you are testing is most likely loading its library from the 2.0.0.2 Ubuntu package. Ansible 2.0.x did not have the ansible.module_utils._text submodule and therefore this error will occur. You need to either uninstall the older versions of ansible or tell python where the version of the library that you need is by setting the PYTHONPATH environment variable.

I'll paste the mailing list and IRC channel information below in case you need to seek further help.

List Information

Hi!

Thanks very much for your interest in Ansible. It sincerely means a lot to us.

This appears to be a user question, and we'd like to direct these kinds of things to either the mailing list or the IRC channel.

If you can stop by there, we'd appreciate it. This allows us to keep the issue tracker for bugs, pull requests, RFEs and the like.

Thank you once again and we look forward to seeing you on the list or IRC. Thanks!

@abadger abadger closed this as completed Jan 11, 2017
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Jan 18, 2017
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 bug This issue/PR relates to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants