一尘不染

pip安装/usr/local/opt/python/bin/python2.7:错误的解释器:没有这样的文件或目录

python

我不知道这是怎么回事,但是我被困在一些无法解决的stackoverflow解决方案上。你能帮我吗?

  Monas-MacBook-Pro:CS764 mona$ sudo python get-pip.py
    The directory '/Users/mona/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    The directory '/Users/mona/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    /tmp/tmpbSjX8k/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
    Collecting pip
      Downloading pip-7.1.0-py2.py3-none-any.whl (1.1MB)
        100% |████████████████████████████████| 1.1MB 181kB/s 
    Installing collected packages: pip
      Found existing installation: pip 1.4.1
        Uninstalling pip-1.4.1:
          Successfully uninstalled pip-1.4.1
    Successfully installed pip-7.1.0
    Monas-MacBook-Pro:CS764 mona$ pip --version
    -bash: /usr/local/bin/pip: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory

阅读 179

收藏
2020-12-20

共1个答案

一尘不染

我曾使用自制软件在OS X 10.10上安装2.7,而新安装缺少符号链接。我跑了

brew link --overwrite python

如何在Homebrew中符号链接python中所述?它解决了问题。

2020-12-20