V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
daimaosix
V2EX  ›  Python

求问 debian 11 中的 pip 如何配置使用 python2 版本呢?

  •  
  •   daimaosix · 2021-10-06 22:53:57 +08:00 · 1405 次点击
    这是一个创建于 930 天前的主题,其中的信息可能已经有所发展或是发生改变。

    请问一下,下午从 Debian 10 更新到了 Debian 11,然后发现 Python 没有了,默认是 Python3.9.2,但 pip 还有,pip 跟 pip3 用的都是默认的 python3,怎么把 pip 指向 python2 呢?我看 debian 仓库已经没有 python-pip 了,于是手动安装了一下,发现 pip 还是默认用的 python3,python2 的 pip 怎么装呢?因为程序需要,必须得用 python3 以下版本。

    2 条回复    2021-10-15 02:55:54 +08:00
    superrichman
        1
    superrichman  
       2021-10-07 07:55:21 +08:00   ❤️ 1
    /path/to/python2 -m pip
    Livid
        2
    Livid  
    MOD
       2021-10-15 02:55:54 +08:00 via iPhone   ❤️ 1
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4832 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 01:09 · PVG 09:09 · LAX 18:09 · JFK 21:09
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.