Issue
I'm trying to install lektor
into a new virtualenv using pyenv virtualenv
. I have no problem making a new virtualenv with Python 3.7.0, but when I try to pip install lektor
, I get a build failure with watchdog
and the following error message:
pyenv: clang: command not found
The `clang' command exists in these Python versions:
anaconda3-5.0.0
error: command 'clang' failed with exit status 127
I understand that the anaconda3 version has clang
, but I also have a version installed in /usr/bin
. The output of which -a clang
is:
$PYENV_ROOT/shims/clang
/usr/bin/clang
Can I manually set the shim to point to usr/bin
? Or is there a different solution to this issue?
Solution
This is a rotten solution, but it does work. By taking the shim for clang and temporarily moving it (e.g., mv $PYENV_ROOT/shims/clang ~/Desktop
), watchdog
can be installed, then the clang shim can be moved back to the original location. A better option would be for pyenv
to default to the system versions of programs if a shim doesn't point anywhere in a given environment…
Alternative solution
The pyenv
plugin pyenv-which-ext
takes care of this class of issues by checking for the existence of utilities in the normal $PATH
after seeing that they aren't present in the current environment. It's a quick install via Homebrew
, took care of all my issues.
Answered By - Dustin Wheeler Answer Checked By - Robin (WPSolving Admin)