gpt4 book ai didi

python - 如何使用 Anaconda 将 IPython4 降级到 3

转载 作者:太空狗 更新时间:2023-10-29 22:15:31 25 4
gpt4 key购买 nike

我目前使用的是 IPython 版本 4。

$ ipython
WARNING: 'inline' not available as pylab backend, using 'auto' instead.
Python 2.7.10 |Anaconda 2.1.0 (x86_64)| (default, Oct 19 2015, 18:31:17)
Type "copyright", "credits" or "license" for more information.

IPython 4.0.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
Using matplotlib backend: MacOSX

In [1]:

如何将它降级到版本 3(低于 4)?

最佳答案

通过使用 conda remove 1 conda install

conda remove 将删除当前版本的 ipython:

conda remove ipython 

然后,您可以选择使用 conda search ipython 搜索要安装的 ipython 版本:

ipython                      0.13                     py27_0  defaults        
0.13 py26_0 defaults
0.13 py33_1 defaults
0.13 py27_1 defaults
0.13 py26_1 defaults
0.13.1 py33_1 defaults
... continues..
3.2.0 py27_0 defaults
3.2.1 py34_0 defaults
3.2.1 py33_0 defaults
3.2.1 py27_0 defaults
4.0.0 py35_0 defaults
4.0.0 py34_0 defaults
* 4.0.0 py27_0 defaults

带星号的条目表示您拥有的当前版本。

然后,使用conda install ipython=version_num 安装你想要的版本。不过,请注意每个 ipython 版本所需的默认 Python 版本!


1 正如我最近注意到的,conda remove 步骤已过时。您可以简单地使用 conda search 列出 python 版本 然后用你想要的版本执行 conda install,anaconda 会为你替换:

(myenv)jim@unx: conda install ipython=3.2.0
Fetching package metadata: ....
Solving package specifications: ................

The following packages will be DOWNGRADED:

ipython: 4.0.1-py27_0 --> 3.2.0-py27_0

Proceed ([y]/n)? y

一切顺利。

关于python - 如何使用 Anaconda 将 IPython4 降级到 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33364286/

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