gpt4 book ai didi

python - IPython 控制台找不到 "backports.shutil_get_terminal_size"并且不会加载

转载 作者:IT老高 更新时间:2023-10-28 20:51:19 25 4
gpt4 key购买 nike

我在 Windows 10 上运行 Python2.7,使用 Anaconda 进行 env 和大多数 pkg 管理。升级了许多软件包后,我的 ipython 控制台现在无法在任何 IDE 或控制台中启动。当我尝试在控制台上运行它时,出现此错误:

Traceback (most recent call last):
File "C:\Anaconda3\Scripts\ipython-script.py", line 3, in <module>
import IPython
File "C:\Anaconda3\lib\site-packages\IPython\__init__.py", line 48, in <module>
from .core.application import Application
File "C:\Anaconda3\lib\site-packages\IPython\core\application.py", line 24, in <module>
from IPython.core import release, crashhandler
File "C:\Anaconda3\lib\site-packages\IPython\core\crashhandler.py", line 28, in <module>
from IPython.core import ultratb
File "C:\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 121, in <module>
from IPython.utils.terminal import get_terminal_size
File "C:\Anaconda3\lib\site-packages\IPython\utils\terminal.py", line 27, in <module>
import backports.shutil_get_terminal_size
ImportError: No module named backports.shutil_get_terminal_size

我尝试做的第一件事是:

pip install --upgrade backports.shutil_get_terminal_size

输出:

Requirement already up-to-date: backports.shutil_get_terminal_size in c:\anaconda3\lib\site-packages

我已经卸载并重新安装了两个 ipython

conda uninstall ipython
conda install ipython

pip uninstall ipython
pip install ipython

还是不行。请帮忙!

最佳答案

试试这个

conda config --add channels conda-forge
conda install backports.shutil_get_terminal_size

关于python - IPython 控制台找不到 "backports.shutil_get_terminal_size"并且不会加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37232446/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com