zoukankan      html  css  js  c++  java
  • mac M1 安装pip2(python2.7)

    %: curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
    %: python get-pip.py
    

    得到大致如下内容:

    pc@pcMacBook-Pro Documents % python get-pip.py 
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
    Defaulting to user installation because normal site-packages is not writeable
    Looking in indexes: http://pypi.douban.com/simple
    Collecting pip<21.0
      Downloading http://pypi.doubanio.com/packages/27/79/8a850fe3496446ff0d584327ae44e7500daf6764ca1a382d2d02789accf7/pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
         |████████████████████████████████| 1.5 MB 1.6 MB/s 
    Installing collected packages: pip
      WARNING: The scripts pip, pip2 and pip2.7 are installed in '/Users/pc/Library/Python/2.7/bin' which is not on PATH.
      Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
    Successfully installed pip-20.3.4
    pc@deMacBook-Pro Documents % pip   #无反应
    

    然后执行:

    sudo ln -s /Users/<你的路径>/Library/Python/2.7/bin/pip /usr/local/bin/pip
    

    最后测试:

    pip -V
    
  • 相关阅读:
    记一次对网站的SEO优化改造
    pc端页面添加响应式布局
    linux开启coredump
    vue中鼠标事件
    垂直居中的几种方法
    最准确的身份证号码正则验证
    将数组[NaN ,1,21,32,NaN,41,5]里面的NaN成员剔除(复用underscore.js的filter方法)
    项目中使用Mockjs模拟数据
    研究生学习与生活(2019)
    研究生学习与生活(九)
  • 原文地址:https://www.cnblogs.com/lisicn/p/15068037.html
Copyright © 2011-2022 走看看