Pipenv not picking up Python version from asdf
Asked Answered
A

1

8

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)
Agnesse answered 28/11, 2018 at 10:55 Comment(0)
A
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…
Agnesse answered 28/11, 2018 at 10:56 Comment(2)
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.Aristate
@NickK9 do you have an existing Pipfile with an explicit python_version requirement that differs from the version you set with asdf?Agnesse

© 2022 - 2024 — McMap. All rights reserved.