python IDLE打不开怎么办

自从我的Mac 文稿文件夹被sudo误初始化后,我的python IDLE就一直打不开.[已解决]

因为IDLE依赖于这个文件夹.

解决方法:

1.打开 IDLE.app/Contents/MacOS/

 2.运行IDLE.app/Contents/MacOS/IDLE

运行结果:

Traceback (most recent call last):
  File "/Applications/Python 3.9/IDLE.app/Contents/Resources/idlemain.py", line 8, in <module>
    os.chdir(os.path.expanduser('/Applications/Python 000'))
FileNotFoundError: [Errno 2] No such file or directory: '/Applications/Python 000'

3.前往/IDLE.app/Contents/Resources/idlemain.py

内容如下:

"""
Bootstrap script for IDLE as an application bundle.
"""
import sys, os

# Change the current directory the user's home directory, that way we'll get
# a more useful default location in the open/save dialogs.
os.chdir(os.path.expanduser('/A
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值