When Pipenv's pyenv support (automatic version installation) doesn't work

I'm addicted to it, so make a note. The story as of 20191209.

tl;dr If it looks like this,

$ pipenv sync
Warning: Python 3.7 was not found on your system…
Would you like us to install CPython 3.7.5 with pyenv? [Y/n]: Y
Installing CPython 3.7.5 with pyenv (this may take a few minutes)…
✔ Success!

Warning: The Python you just installed is not available on your PATH, apparently.

This is OK: ok_hand:

pip install --user pipenv==v2018.7.1
pip install pip==18.0

Pipenv pyenv support

Pipenv has [a function that automatically installs the version described in Pipfile if pyenv is installed](https://pipenv.kennethreitz.org/en/latest/advanced/#automatic-python- There is installation).

However, it seems that it is broken at the moment latest (v2018.11.26). issue: Pyenv support broken #3551

When I try it, it looks like this, and it says Success, but it doesn't work properly.

$ pipenv sync
Warning: Python 3.7 was not found on your system…
Would you like us to install CPython 3.7.5 with pyenv? [Y/n]: Y
Installing CPython 3.7.5 with pyenv (this may take a few minutes)…
✔ Success!

Warning: The Python you just installed is not available on your PATH, apparently.

Lower the version of Pipenv

In the comment of the issue, there are comments such as "It works if you use the master branch" or "It works if you lower the version", so I tried lowering the version.

$ pip install --user pipenv==v2018.7.1
...
Successfully installed pipenv-2018.7.1

This time Pipenv itself stopped working.

$ pipenv sync
...
TypeError: 'module' object is not callable

Also lower the version of pip

Since I downgraded Pipenv, I have to lower the corresponding pip version as well. issue: pip 18.1 causes "TypeError: 'module' object is not callable" #2924

$ pip install pip==18.0
...
Successfully installed pip-18.0

This worked: thumbsup:

$ pipenv sync
...
All dependencies are now up-to-date!

However, the lock breaks

issue: Running pipenv gives TypeError: 'module' object is not callable #2871

It's hard. For the time being, I am operating while switching versions. It's hard.

$ pip install --user pipenv==v2018.11.26

Serpentine

It seems that the issue that Pipenv has been released for a long time is being discussed at this issue. Good luck ~~: muscle:

Recommended Posts

When Pipenv's pyenv support (automatic version installation) doesn't work
When send_keys doesn't work
When dropbox-sdk-python doesn't work
When matplotlib doesn't work with python2.7
pyenv doesn't work with tcl-tk installed by homebrew.