如何在~/.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.
这里的评论中的每个请求都是我的路径
/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
答案 0 :(得分:0)
所有填充文件实际上似乎都是相同的,因此您应该始终能够执行cp ~/.pyenv/shims/{python,pip}
。