# Bootstrapping versions with the pip module

**URL:** <https://forum.ansible.com/t/bootstrapping-versions-with-the-pip-module/14111>\
**Category:** Ansible Project\
**Created:** [December 10, 2013, 10:23am UTC](https://forum.ansible.com/t/bootstrapping-versions-with-the-pip-module/14111 "2013-12-10T10:23:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustav\_Andersson](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@Gustav\_Andersson](https://forum.ansible.com/u/Gustav_Andersson)\
**Post date:** [December 10, 2013, 10:23am UTC](https://forum.ansible.com/t/bootstrapping-versions-with-the-pip-module/14111/1 "2013-12-10T10:23:35Z")

</div>

Is this currently possible with Ansibles pip module? I have been googling and trying different ways all morning but come up empty handed.

Say I want to install the latest 1.2 version of a specific package with pip, but not 1.3.x versions due to compatibility issues. Manually I could run:

> pip package\>=1.2,\<1.3

And this would do the trick. But using the version parameter in Ansibles pip module seems to expect a specific version only. I can’t specify the version parameter to be \>=1.2,\<1.3, this gives an error.  
Then I tried bypassing the version parameter by specifying name=“package\>=1.2,\<1.3” but Ansible caught me and gave me a _msg: version must be specified in the version parameter_ error.

I could obviously set the version to the latest 1.2.x version and update if bug fixes are made. But it would be very neat if it could be done automatically.

Thankful for all suggestions

/Gustav

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [December 10, 2013, 5:37pm UTC](https://forum.ansible.com/t/bootstrapping-versions-with-the-pip-module/14111/2 "2013-12-10T17:37:47Z")

</div>

You could use the pip module with a requirements.txt.

I do agree version should be specified in the version parameter.

I do welcome attempts to upgrade the module, should you wish to try!

---

<div class="post-metadata">

**Author:** ![Gustav\_Andersson](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@Gustav\_Andersson](https://forum.ansible.com/u/Gustav_Andersson)\
**Post date:** [December 11, 2013, 3:33pm UTC](https://forum.ansible.com/t/bootstrapping-versions-with-the-pip-module/14111/3 "2013-12-11T15:33:44Z")

</div>

Hi Michael  
The requirements.txt could be a way to go, might require some restructuring but thanks for the suggestion.  
And if I have some time over I might have a go at implementing the function 🙂

Regards Gustav
