Too many issues will kill our team's development velocity, drastically.
Make sure you have checked all steps below.
pyenv and the default python-build plugin only. Please refrain from reporting issues of other plugins here.PYENV_DEBUG=1, e.g. env PYENV_DEBUG=1 pyenv install -v 3.6.4 pyenv seems to be ignoring the PATH variable for finding binaries. In this case, specifically, it's clang. In the gist you can see that PATH is:
PATH='/usr/local/Cellar/pyenv/1.2.7/libexec:/Users/<USER>/.pyenv/shims:/Users/<USER>/.pyenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin'
clang can be found in /usr/bin/clang:
pc:voice <USER>$ ls /usr/bin/clang
-rwxr-xr-x 1 root wheel 18288 Jul 4 02:07 /usr/bin/clang
but pyenv which clang reports command not found:
pc:voice <USER>$ pyenv which clang
pyenv: clang: command not found
This makes it difficult to install pip packages that require compilation (hmmlearn, for example), though a work-around I've found is exporting CC=clang, for certain packages.
I get a similar behaviour on MacOS 10.12.6 and pyenv 1.2.4.
As a note, I use the pyenv-virtualenv and pyenv-virtualenvwrapper plugin.
A binary in /usr/local/bin installed via Homebrew won't get found by pyenv when I am not in the system python version.
When in the system python:
➜ pyenv which raiden
/usr/local/bin/raiden
When I set a "shell" virtualenv (named global):
➜ pyenv shell global
(global)
➜ pyenv which raiden
pyenv: raiden: command not found
Yeah, this seems to be the underlying issue for a lot of errors I ran into trying to fix my checking whether the C compiler works... no issue.
Settings all kinds of flags leads to other errors I see reported here and on stackoverflow which wasn't a fix for me.
In the end what worked for me is
pyenv --debug install <version> where version is a cpython version.
Then manually going to the working tree folder and running the python-build <version> /Users/hvdklauw/.pyenv/versions/<version> command.
That would run just fine and install the version for python without issue.
Should note that this is pyenv 1.2.11 (and HEAD) installed through homebrew on os 10.14.4.
Something about how the brew installation works is a problem -- this all works fine on Linux, but I am running into the same issue on OSX.
I tried just using the install script: https://github.com/pyenv/pyenv-installer and things work properly.
Most helpful comment
I get a similar behaviour on MacOS 10.12.6 and pyenv 1.2.4.
As a note, I use the pyenv-virtualenv and pyenv-virtualenvwrapper plugin.
A binary in
/usr/local/bininstalled via Homebrew won't get found by pyenv when I am not in thesystempython version.When in the
systempython:When I set a "shell" virtualenv (named global):