7

Trying to create a Pipfile for a specific Python version, but pipenv fails to detect that the installed Python version is present. Using asdf to install and manage Python versions.

↪ python --version
Python 3.6.6

↪ pipenv --python 3.6.6
Warning: Python 3.6.6 was not found on your system…
You can specify specific versions of Python with:
  $ pipenv --python path/to/python


↪ asdf current python
3.6.6    (set by /Users/dennis/some/project/.tool-versions)
Stratus3D
  • 4,648
  • 4
  • 35
  • 67
Dennis
  • 56,821
  • 26
  • 143
  • 139

1 Answers1

9

Recreate the shims for the desired Python version, then try again.

↪ asdf update

↪ asdf reshim python 3.6.6

↪ pipenv --python 3.6.6
Creating a virtualenv for this project…
Dennis
  • 56,821
  • 26
  • 143
  • 139
  • This didn't work for me. Even passing `pipenv --python 3.10.10`, I still get `Warning: Your Pipfile requires python_version 3.11, but you are using 3.10.10`. – Nick K9 Apr 28 '23 at 21:29
  • @NickK9 do you have an existing `Pipfile` with an explicit `python_version` requirement that differs from the version you set with `asdf`? – Dennis Jul 21 '23 at 15:51