Trouble installing drupal-project with Composer I have followed the directions to install drupal-project with drupal-composer.
I keep getting this error and it doesn't make sense to me.


  [InvalidArgumentException]
   Could not find package drupal-composer/drupal-project with version 8.x-dev in a  version installable using your PHP version 5.5.38.


I am using MAMP and the php version is 7.1.22. I even tried the template download for drupal-composer/drupal-project and I still get the same error. Composer is installed, verified with the checking the version in terminal.

I have searched and cannot find anything to assist me in solving. Yes, I am new to composer and trying to get a local environment setup with composer versus just downloading etc. Any help or direction would be appreciated.
Despite not technically being a Drupal question, this gets asked a lot. The answer, for anyone coming across this using various local dev stacks - you need to inform your command line of where PHP ($PATH variable) is that you want to use. Otherwise it will default to what is installed on your machine, likely very out of date.