Pipenv: Pipenv fails to install Python 3.6.6 with pyenv

Created on 16 Jul 2018  路  1Comment  路  Source: pypa/pipenv

Issue description

I installed pipenv and pyenv via homebrew on Mac OS X 10.13.4.
I added the following line to my ~/.bash_profile

export PYENV_ROOT="$HOME/.pyenv"

My Pipfile restricts the version of Python to 3.6

[requires]
python_version = "3.6"

I run

pipenv install --dev
Expected result

I expect pipenv to install the latest version of Python 3.6 via pyenv

Actual result
$ pipenv install --dev
Warning: Python 3.6 was not found on your system...
Would you like us to install CPython 3.6.6 with pyenv? [Y/n]: Y
Installing CPython 3.6.6 with pyenv (this may take a few minutes)...
鉅婼omething went wrong...
python-build: definition not found: 3.6.6

The following versions contain `3.6.6' in the name:
  3.6.6rc1

See all available versions with `pyenv install --list'.

If the version you need is missing, try upgrading pyenv:

  brew update && brew upgrade pyenv

Traceback (most recent call last):
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==2018.7.1', 'console_scripts', 'pipenv')()
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/cli.py", line 435, in install
    selective_upgrade=selective_upgrade,
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/core.py", line 1759, in do_install
    pypi_mirror=pypi_mirror,
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/core.py", line 609, in ensure_project
    three=three, python=python, site_packages=site_packages, pypi_mirror=pypi_mirror
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/core.py", line 545, in ensure_virtualenv
    python = ensure_python(three=three, python=python)
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/core.py", line 512, in ensure_python
    click.echo(crayons.blue(c.out), err=True)
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/vendor/delegator.py", line 99, in out
    self.__out = self._pexpect_out
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/vendor/delegator.py", line 85, in _pexpect_out
    result += self.subprocess.after
TypeError: can only concatenate str (not "type") to str

When I do

$ pyenv install --list | grep 3.6
  3.3.6
  3.6.0
  3.6-dev
  3.6.1
  3.6.2
  3.6.3
  3.6.4
  3.6.5
  3.6.6rc1
  activepython-3.6.0

one can see, that a version 3.6.6 indeed doesn't exist, only a version 3.6.6rc1. I think pipenv should try to install 3.6.5 and not 3.6.6 and also not 3.6.6rc1 (because that is an unstable version).

Most helpful comment

Homebrew鈥檚 pyenv is lagging a bit behind, we jumped the gun and updated the mapping too early. Please resort to installing 3.6.5 manually until Homebrew catches up (and remember to update/upgrade Homebrew regularly!).

We鈥檙e also implementing a new version discovery mechanism in the next release, so this won鈥檛 be a problem in the future. Sorry for the trouble and confusion!

>All comments

Homebrew鈥檚 pyenv is lagging a bit behind, we jumped the gun and updated the mapping too early. Please resort to installing 3.6.5 manually until Homebrew catches up (and remember to update/upgrade Homebrew regularly!).

We鈥檙e also implementing a new version discovery mechanism in the next release, so this won鈥檛 be a problem in the future. Sorry for the trouble and confusion!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

erinxocon picture erinxocon  路  3Comments

jeyraof picture jeyraof  路  3Comments

AkiraSama picture AkiraSama  路  3Comments

jerzyk picture jerzyk  路  3Comments

johnjiang picture johnjiang  路  3Comments