Receiving Your Pipfile requires python_version 3.7, but you are using unknown, when running pytest even though I have Python 3.7.0 installed

Viewed 1591

When I run pipenv run pytest on my Windows machine, I get the following message:

Warning: Your Pipfile requires python_version 3.7, but you are using unknown (C:\Users\d.\v\S\python.exe).

$ pipenv --rm and rebuilding the virtual environment may resolve the issue.
$ pipenv check will surely fail

I have tried running pipenv --rm, pipenv install & re-running the tests but I get the same error message.

Under Programs and Features, I have Python 3.7.0 (64-bit) & Python Launcher so I'm not sure where it is getting the unkown version from.

Can someone please point me in the right direction?

1 Answers

I had a similar issue, the following fixed my issue.

  1. Updating pip using the 'c:\users...\python.exe -m pip install --upgrade pip' command
  2. adding PYTHONPATH (pointing to the directory with the pipfil) to enviroment variables
  3. removing the current virtualenv (pipenv --rm)
  4. and reinstalling (pipenv install)
Related