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
darkaforest
V2EX  ›  Python

macOS Monterey 12.3 Beta 升级之后 Python 没了 这可如何是好

  •  
  •   darkaforest · 2022-02-16 00:47:00 +08:00 · 3555 次点击
    这是一个创建于 799 天前的主题,其中的信息可能已经有所发展或是发生改变。

    发现每次在终端打 cd 的时候都会报一个错:

    image.png

    执行 which python 也找不到

    image.png

    进去 /usr/bin 发现有一堆 python.x 就是没有 python

    image.png

    但是到目前为止未发现有任何异常,除了每次 cd 都会报错,但是确实又 cd 进去了……

    6 条回复    2022-02-16 10:45:19 +08:00
    BrettD
        1
    BrettD  
       2022-02-16 01:05:13 +08:00 via iPhone
    Homebrew 装一个 Python 啊
    karronqiu
        2
    karronqiu  
       2022-02-16 01:43:17 +08:00 via Android   ❤️ 1
    应该是你环境变量里面用了 python ,看看.zshrc 或者别的文件里面有没有,删掉就好了。现在应该都是用 python3 了,python2 不再用了
    yyfearth
        3
    yyfearth  
       2022-02-16 02:41:07 +08:00   ❤️ 1
    macOS 12.3 移除了自带的 python2
    肯定是你的 zshrc 或者 bashrc 里面用了 python 了 如果不需要移除就是
    如果需要 homebrew 自己安装一个就好
    Livid
        4
    Livid  
    MOD
       2022-02-16 09:47:20 +08:00 via iPhone
    brew 安装 pyenv 然后可以再通过 pyenv 安装你需要的版本。
    RickyC
        5
    RickyC  
       2022-02-16 10:26:30 +08:00
    输入 python3 试试呢?
    podel
        6
    podel  
       2022-02-16 10:45:19 +08:00
    miniconda 很不错。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2045 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:17 · PVG 00:17 · LAX 09:17 · JFK 12:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.