question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pyenv support broken

See original GitHub issue

Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.

$ pipenv --version
pipenv, version 2018.11.26

Probably related to #3136, however, I can’t reopen that.

Issue description

pipenv doesn’t find pyenv-python versions.

Expected result

When calling pipenv install pipenv should detect existing versions of Python installed by pyenv. If it doesn’t find a Python version as specified in the Pipfile it should start installing the correct Python version via pyenv and then use it to create the virtual environment.

Actual result / Steps to replicate

$ pyenv versions
* system (set by /Users/$USER/.pyenv/version)
  3.5.5
  3.6.5
  3.6.8
$ env|grep PY
PYENV_ROOT=/Users/$USER/.pyenv
$ pipenv --python 3.6
Warning: Python 3.6 was not found on your system…
Would you like us to install CPython 3.6.8 with pyenv? [Y/n]:
Installing CPython 3.6.8 with pyenv (this may take a few minutes)…
✔ Success!

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

$ pipenv --support

Pipenv version: '2018.11.26'

Pipenv location: '/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv'

Python location: '/usr/local/Cellar/pipenv/2018.11.26_2/libexec/bin/python3.7'

Python installations found:

  • 3.7.2: /usr/local/bin/python3
  • 3.7.2: /usr/local/bin/python3.7m
  • 2.7.15: /usr/local/bin/python
  • 2.7.15: /usr/local/bin/pythonw
  • 2.7.10: /usr/bin/python
  • 2.7.10: /usr/bin/pythonw
  • 2.7.10: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.2',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '18.2.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST '
                     '2018; root:xnu-4903.241.1~1/RELEASE_X86_64',
 'python_full_version': '3.7.2',
 'python_version': '3.7',
 'sys_platform': 'darwin'}

System environment variables:

  • PATH
  • TERM_PROGRAM
  • DOTNET_CLI_TELEMETRY_OPTOUT
  • PYENV_ROOT
  • SHELL
  • TERM
  • HISTSIZE
  • TMPDIR
  • Apple_PubSub_Socket_Render
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • LC_ALL
  • OBJC_DISABLE_INITIALIZE_FORK_SAFETY
  • USER
  • HISTFILESIZE
  • COMMAND_MODE
  • SSH_AUTH_SOCK
  • __CF_USER_TEXT_ENCODING
  • _
  • PWD
  • LANG
  • ITERM_PROFILE
  • XPC_FLAGS
  • ITERM_ORIG_PS1
  • XPC_SERVICE_NAME
  • HISTCONTROL
  • COLORFGBG
  • HOME
  • SHLVL
  • ITERM_PREV_PS1
  • ITERM_SESSION_ID
  • LOGNAME
  • LC_CTYPE
  • SECURITYSESSIONID
  • COLORTERM
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /usr/local/Cellar/pipenv/2018.11.26_2/libexec/tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/sbin:/usr/local/opt/go/libexec/bin:/Users/$USER/go/bin:/Users/$USER/.gem/ruby/2.3.0/bin/
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /Users/$USER/dev/myproject

Contents of Pipfile (‘/Users/$USER/dev/myproject/Pipfile’):


Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
techalchemycommented, Mar 5, 2019

this is resolved in master

you can fix it for now by running pip install -e git+https://github.com/pypa/pipenv.git@master#egg=pipenv

sorry for the frustration and thanks for your patience

1reaction
Nothing4Youcommented, Nov 6, 2019

See #3742

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot switch Python with pyenv - Stack Overflow
I successfully downloaded python2 and python3 and pyenv with following codes. brew install pyenv brew install pyenv-virtualenv pyenv install 2.7.10 pyenv ...
Read more >
Not Able to Build Some Versions of Python on M1 at 12.3.1
I trying to build older version of python such as 3.6, 3.7, 3.8 using pyenv and having build failures. I am on apple...
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
☤ My pyenv-installed Python is not found¶. Make sure you have PYENV_ROOT set correctly. Pipenv only supports CPython distributions, with version name like...
Read more >
Python fails to load after installing via (zsh's) pyenv (Python ...
Straight to the point. I have Matlab 2018b, installed on mac, running BigSur (macos 11.4), with the default shell set as ZSH.
Read more >
Changes to Homebrew adversely affect Python development
`brew install openssl` or `brew upgrade openssl` will still break pyenv virtualenvs, though they can then be fixed with `pyenv rehash`.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found