# Unable to find any of pip3 to use. pip needs to be installed

**URL:** <https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503>\
**Category:** Get Help\
**Tags:** pip, python\
**Created:** [June 14, 2024, 11:35am UTC](https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503 "2024-06-14T11:35:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhinanth\_k](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/abhinanth_k/32/3777_2.png) [@abhinanth\_k](https://forum.ansible.com/u/abhinanth_k)\
**Post date:** [June 14, 2024, 11:35am UTC](https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503/1 "2024-06-14T11:35:03Z")

</div>

Hi  
I am trying to use my community.mysql.mysql\_user and other mysql module am getting this error, Please help to fix this issue

 ![play-pip](https://us1.discourse-cdn.com/ansible/original/2X/e/ecd6ee3abdc9d8bdabd1e86424d547fd246c7922.png)

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [June 14, 2024, 11:45am UTC](https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503/2 "2024-06-14T11:45:26Z")

</div>

What Linux disto(s) are you targetting? I expect most package PyMySQL, so best use the distro package, eg:

- [Debian python3-pymysql](https://packages.debian.org/bookworm/python3-pymysql)
- [Ubuntu python3-pymysql](https://packages.ubuntu.com/noble/python3-pymysql)

If your distro doesn’t ship `pymysql` then you would need to install the `pip3` package prior to using `ansible.builtin.pip`, however I’d suggest that you might be better off using [community.general.pipx](https://docs.ansible.com/ansible/latest/collections/community/general/pipx_module.html) as it won’t conflict with the system Python packages as it uses virtual environments.

---

<div class="post-metadata">

**Author:** ![abhinanth\_k](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/abhinanth_k/32/3777_2.png) [@abhinanth\_k](https://forum.ansible.com/u/abhinanth_k)\
**Post date:** [June 14, 2024, 3:05pm UTC](https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503/3 "2024-06-14T15:05:25Z")

</div>

using almalinux9 as manage node  
Now am getting this error after using community pip module

fatal: : FAILED! =\> {“changed”: false, “cmd”: “/bin/pip3 list --include-injected --json”, “msg”: “\nUsage: \n pip3 list [options]\n\nno such option: --include-injected”, “rc”: 2, “stderr”: “\nUsage: \n pip3 list [options]\n\nno such option: --include-injected\n”, “stderr\_lines”: [“”, "Usage: “, " pip3 list [options]”, “”, “no such option: --include-injected”], “stdout”: “”, “stdout\_lines”: }

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [June 14, 2024, 3:12pm UTC](https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503/4 "2024-06-14T15:12:09Z")

</div>

The `--include-injected` option is a [pipx flag](https://pipx.pypa.io/stable/docs/#pipx-upgrade) not a `pip3` one, that is why you task failed, however:

> [@abhinanth\_k](#):
>
> almalinux9

I’ve not used RedHat based distros for a long time, someone else here will hopefully be able to help you — I would expect Redhat based distros would provide a packaged version of the Python PyMySQL library and I’d suggest you would be best off using that rather than installing your own version 🤷 .

---

<div class="post-metadata">

**Author:** ![abhinanth\_k](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/abhinanth_k/32/3777_2.png) [@abhinanth\_k](https://forum.ansible.com/u/abhinanth_k)\
**Post date:** [June 14, 2024, 3:37pm UTC](https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503/5 "2024-06-14T15:37:35Z")

</div>

Thanks for the response, @chris, am expecting somebody will help me to resolve this issue.

---

<div class="post-metadata">

**Author:** ![chris](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chris/32/293_2.png) [@chris](https://forum.ansible.com/u/chris)\
**Post date:** [June 14, 2024, 4:14pm UTC](https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503/6 "2024-06-14T16:14:50Z")

</div>

Based on the [title of this article](https://access.redhat.com/solutions/5547681) the RPM you need to install is called `python3-PyMySQL`, so why don’t you try using the [ansible.builtin.dnf module](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dnf_module.html) to install this package?

---

<div class="post-metadata">

**Author:** ![abhinanth\_k](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/abhinanth_k/32/3777_2.png) [@abhinanth\_k](https://forum.ansible.com/u/abhinanth_k)\
**Post date:** [June 15, 2024, 2:16pm UTC](https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503/7 "2024-06-15T14:16:51Z")

</div>

> [@chris](#):
>
> python3-PyMySQL

Thanks @chris it working after installing python3-PyMySQL

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [July 21, 2024, 8:20pm UTC](https://forum.ansible.com/t/unable-to-find-any-of-pip3-to-use-pip-needs-to-be-installed/6503/8 "2024-07-21T20:20:54Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
