How to use pip module wiht multiple packages and versions

I have a long list packages to install in the fashion:

pip install ==

I can see that you can do

pip: name={{ item }} state=present
with_items:
  - <package>
  - <package>
   ...

But how can I specify the version in a loop?   

Sorry, new at this...

Many thanks

I do this

- pip:
     name={{ item.name }}
     version={{ item.version | default(omit) }}
   with_items:
     - name: pack1
       version: 1.1
     - name: pack2
     - name: pack3
     - name: pack4
       version: 5.0

As you can see, you'll be able to mix packages with or without version requirement.

That is great.

Gratitude!