Pyenv-virtualenv: pyenv-root: command not found

Created on 23 May 2017  路  7Comments  路  Source: pyenv/pyenv-virtualenv

Hi,
I've installed pyenv-virtualenv via homebrew on my Mac (running mcOS Sierra 10.12.5).

As soon I'm issuing
> pyenv-virtualenv
I get result
/usr/local/bin/pyenv-virtualenv: line 18: command not found

However, replacing at line 18
PYENV_ROOT="$(pyenv-root)"
with
PYENV_ROOT="$(pyenv root)"
it works.

Most helpful comment

Is there anyway to throw a better error message? For example

What exists today:

$ pyenv-virtualenv
/usr/local/bin/pyenv-virtualenv: line 18: pyenv-root: command not found

Suggestion:

$ pyenv-virtualenv
/usr/local/bin/pyenv-virtualenv: line 18: pyenv-root: command not found

Did you mean "pyenv virtualenv" instead?

All 7 comments

You should not call pyenv-virtualenv, but pyenv virtualenv.

And Homebrew should not install it into /usr/local/bin/pyenv-virtualenv probably?!

Hi @blueyed ,

Using pyenv virtualenv (as mentioned in documentation...) works for me now.

Honestly, I've just installed both pyenv and pyenv-virtualenv via homebrew.
So I can't say too much about installation location.

Thank you very much!

Yes, you might report that for the Homebrew package - it is confusing to have it in the PATH certainly.

Checked that /usr/local/bin/..., it's only a link to cellar.
So it's probably ok.

Checked that /usr/local/bin/..., it's only a link to cellar.

?
pyenv-virtualenv is a link to cellar?!
Well, having it in the PATH caused you creating this issue after all, since you were confused.
Also for shell completion it is bad in general to have them there.

Thanks for taking care!

I have been probably a little bit inexact. What I tried to say was:
my /usr/local/bin/pyenv-virtualenv links to /usr/local/Cellar/pyenv-virtualenv/1.0.0/bin/pyenv-virtualenv

But it seems I have some issues in general. Installing python3 via homebrew and issuing its pip3 results in files being copied to /usr/local/lib/python3.6/site-packages, which is not a link at all.

Is there anyway to throw a better error message? For example

What exists today:

$ pyenv-virtualenv
/usr/local/bin/pyenv-virtualenv: line 18: pyenv-root: command not found

Suggestion:

$ pyenv-virtualenv
/usr/local/bin/pyenv-virtualenv: line 18: pyenv-root: command not found

Did you mean "pyenv virtualenv" instead?
Was this page helpful?
0 / 5 - 0 ratings