title: Install ansible on Centos7 using pip3
body: <p>Ive installed ansible version 2.9.25 (latest for centos) but it’s failing to download a file using the ‘get_url’ module and everything I google seems to point to using python2 as opposed to python3. So I'm trying to install ansible via pip3 which the <a href="https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html" rel="nofollow noreferrer">documentation</a> claims will install ansible using python3 but gives Unicode Error:</p>
  <pre><code># pip3 install ansible
  Collecting ansible
    Using cached ansible-4.6.0.tar.gz (35.6 MB)
  Collecting ansible-core&lt;2.12,&gt;=2.11.5
    Using cached ansible-core-2.11.5.tar.gz (6.8 MB)
  ERROR: Exception:
  Traceback (most recent call last):
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/cli/base_command.py&quot;, line 173, in _main
      status = self.run(options, args)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/cli/req_command.py&quot;, line 203, in wrapper
      return func(self, options, args)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/commands/install.py&quot;, line 316, in run
      reqs, check_supported_wheels=not options.target_dir
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/resolver.py&quot;, line 95, in resolve
      collected.requirements, max_rounds=try_to_avoid_resolution_too_deep
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py&quot;, line 472, in resolve
      state = resolution.resolve(requirements, max_rounds=max_rounds)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py&quot;, line 366, in resolve
      failure_causes = self._attempt_to_pin_criterion(name)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py&quot;, line 212, in _attempt_to_pin_criterion
      criteria = self._get_updated_criteria(candidate)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py&quot;, line 203, in _get_updated_criteria
      self._add_to_criteria(criteria, requirement, parent=candidate)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py&quot;, line 172, in _add_to_criteria
      if not criterion.candidates:
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/structs.py&quot;, line 151, in __bool__
      return bool(self._sequence)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py&quot;, line 140, in __bool__
      return any(self)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py&quot;, line 128, in &lt;genexpr&gt;
      return (c for c in iterator if id(c) not in self._incompatible_ids)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py&quot;, line 32, in _iter_built
      candidate = func()
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/factory.py&quot;, line 209, in _make_candidate_from_link
      version=version,
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py&quot;, line 301, in __init__
      version=version,
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py&quot;, line 156, in __init__
      self.dist = self._prepare()
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py&quot;, line 227, in _prepare
      dist = self._prepare_distribution()
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py&quot;, line 306, in _prepare_distribution
      self._ireq, parallel_builds=True
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py&quot;, line 508, in prepare_linked_requirement
      return self._prepare_linked_requirement(req, parallel_builds)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py&quot;, line 552, in _prepare_linked_requirement
      self.download_dir, hashes
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py&quot;, line 249, in unpack_url
      unpack_file(file.path, location, file.content_type)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/utils/unpacking.py&quot;, line 256, in unpack_file
      untar_file(filename, location)
    File &quot;/usr/local/lib/python3.6/site-packages/pip/_internal/utils/unpacking.py&quot;, line 226, in untar_file
      with open(path, &quot;wb&quot;) as destfp:
  UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 117: ordinal not in range(128)
  
  </code></pre>
  <p>Commands I've ran to try fix:</p>
  <pre><code>pip3 install setuptools_rust
  pip3 install --upgrade pip
  pip3 install ansible 
  sudo yum install gcc libffi-devel python3-dev python-devel openssl-devel
  sudo yum install -y git python-devel python-pip gcc gcc-c++
  
  </code></pre>
  <p>Other solutions I've tried:
  <a href="https://github.com/paramiko/paramiko/issues/1027#issuecomment-371754576" rel="nofollow noreferrer">https://github.com/paramiko/paramiko/issues/1027#issuecomment-371754576</a></p>
  <p>Current setup:</p>
  <pre><code># pip --version
  pip 21.2.4 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
  # pip3 --version
  pip 21.2.4 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
  # python --version
  Python 2.7.5
  # python3 --version
  Python 3.6.8
  </code></pre>
  <p>Please let me know if there's any other information I can provide!</p>