I've installed pyenv and have different versions of python installed with it:
$ pyenv versions
  system
  2.7.1
  3.2.5
  3.5.0
  3.5.1
* 3.5.2
I use the following command to switch to python 3.5.2:
pyenv shell 3.5.2
And when I check the python version this is what I get:
$ python --version
Python 3.5.2
But when I run pytest, it still runs under python 2.7.6:
pytest -v
==================================================================== test session starts ====================================================================
platform linux2 -- Python 2.7.6, pytest-3.0.3, py-1.4.31, pluggy-0.4.0 -- /usr/bin/python
Why is pytest running under the older version?