pip安装/usr/local/opt/python/bin/python2.7:错误的解释器:没有这样的文件或目录 [英] pip installation /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory

查看:879
本文介绍了pip安装/usr/local/opt/python/bin/python2.7:错误的解释器:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道这是怎么回事,但是我一直在遵循一些无济于事的stackoverflow解决方案.你能帮我吗?

I don't know what's the deal but I am stuck following some stackoverflow solutions which gets nowhere. Can you please help me on this?

  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

推荐答案

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

I had used home-brew to install 2.7 on OS X 10.10 and the new install was missing the sym links. I ran

brew link --overwrite python

如何在自制软件中对python进行符号链接一样? >并解决了问题.

as mentioned in How to symlink python in Homebrew? and it solved the problem.

这篇关于pip安装/usr/local/opt/python/bin/python2.7:错误的解释器:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆