我如何得到一个点垫片~/.pyenv/shims
。我正在使用 pyenv,但which pip
仍然显示 pip 的系统版本。
根据从文档复制的以下评论,它似乎应该通过重新散列发生,但我已经运行pyenv rehash
并且没有任何反应
从文档复制:
Through a process called rehashing, pyenv maintains shims in that directory to match every Python command across every installed version of Python—python, pip, and so on.
根据评论中的请求,这里是我的 PATH
/Users/patrick/google-cloud-sdk/bin:/Users/patrick/.pyenv/shims:/Users/patrick/.pyenv/bin:/Users/patrick/.local/bin:/Users/patrick/npm/bin:/Users/patrick/google_appengine:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mongodb/bin
这是我的~/.pyenv/shims
内容:
$ ll ~/.pyenv/shims/
total 80
drwxr-xr-x 12 patrick staff 408 May 23 09:49 .
drwxr-xr-x 22 patrick staff 748 May 4 18:10 ..
-rwxr-xr-x 1 patrick staff 408 May 4 18:15 2to3
-rwxr-xr-x 1 patrick staff 408 May 4 18:15 idle
-rwxr-xr-x 1 patrick staff 408 May 4 18:15 pydoc
-rwxr-xr-x 1 patrick staff 408 May 4 18:15 python
-rwxr-xr-x 1 patrick staff 408 May 4 18:15 python-config
-rwxr-xr-x 1 patrick staff 408 May 4 18:15 python2
-rwxr-xr-x 1 patrick staff 408 May 4 18:15 python2-config
-rwxr-xr-x 1 patrick staff 408 May 4 18:15 python2.7
-rwxr-xr-x 1 patrick staff 408 May 4 18:15 python2.7-config
-rwxr-xr-x 1 patrick staff 408 May 4 18:15 smtpd.py