# Could not parse version constraint error

**URL:** <https://discourse.slimframework.com/t/could-not-parse-version-constraint-error/477>\
**Category:** Questions\
**Created:** [July 6, 2016, 10:13am UTC](https://discourse.slimframework.com/t/could-not-parse-version-constraint-error/477 "2016-07-06T10:13:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Molnareva](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Molnareva](https://discourse.slimframework.com/u/Molnareva)\
**Post date:** [July 6, 2016, 10:13am UTC](https://discourse.slimframework.com/t/could-not-parse-version-constraint-error/477/1 "2016-07-06T10:13:55Z")

</div>

Hi!  
I am trying to install slim 3 with the composer. I have downloaded the composer, I wrote:composer require slim/slim “^3.0” to the command line and I got an error: could not parse version constraint “^3.0”: Invalid version string.  
What am I doing wrong?  
Thanks!

---

<div class="post-metadata">

**Author:** ![akrabat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/akrabat/32/9_2.png) [@akrabat](https://discourse.slimframework.com/u/akrabat)\
**Post date:** [July 6, 2016, 10:23am UTC](https://discourse.slimframework.com/t/could-not-parse-version-constraint-error/477/2 "2016-07-06T10:23:59Z")

</div>

Reading [https://getcomposer.org/doc/03-cli.md#require](https://getcomposer.org/doc/03-cli.md#require), try:

```auto
composer require slim/slim:^3.0

```

Though, I think you’ll find that:

```auto
composer require slim/slim

```

will install what you want…

---

<div class="post-metadata">

**Author:** ![Molnareva](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Molnareva](https://discourse.slimframework.com/u/Molnareva)\
**Post date:** [July 6, 2016, 10:29am UTC](https://discourse.slimframework.com/t/could-not-parse-version-constraint-error/477/3 "2016-07-06T10:29:45Z")

</div>

> [@akrabat](#):
>
> composer require slim/slim:^3.0

Thanks for your quick response!  
None of those worked, but I have also noticed, that there war another message saying, that my composer was 30 days old.  
I am Windows machine, so I had to navigate to ProgramData\Composer\bin folder, open the command line and run : composer self-update  
The composer was updated to the latest version, I ran the installation command for slim again and everything went fine!  
So the problem was not with the command, but with the composer. 🙂
