0

有没有人在 centOS 6.3 中使用过 ipython3 ?我安装了 ipython(python2.6),但似乎我无法将它与 python3 一起使用,fedora 18 似乎有一个错误 https://bugzilla.redhat.com/show_bug.cgi?id=784947

4

1 回答 1

1

我做到了,方法如下:

  • python3安装到 /opt/python3/ 与

    • yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
    • wget http://www.python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
    • bzip2 -cd Python-3.3.2.tar.bz2 | tar xvf -
    • cd Python-3.3.2 && ./configure --prefix=/opt/python3
    • make && make install
    • ln -s /opt/python3/bin/python3 /usr/bin/python3

    • 安装分发

    • wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.43.tar.gz#md5=a216a46dc9bec5835fa3c6041f1c77c2

    • tar xvf distribute-0.6.43.tar.gz && cd distribute-0.6.43 && python3 setup.py install

    • 一点点不会伤害:

    • cd /opt/pytnon3/bin && ./easy_install pip

    • 最后,输入ipython3

    • cd ~ && wget pypi.python.org/packages/source/i/ipython/ipython-0.13.2.tar.gz#md5=ead3b7eb70c653b537fb9d96d71b8b2a

    • tar xvf ipython-0.13.2.tar.gz && cd ipython-0.13.2
    • python3 setup.py install

正如它在网络上随处指出的那样,python 2被使用yum并且您不想破坏它,因此您python3小心地将其放在一边。

[root@terras bin]# cat /etc/*release*
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
cpe:/o:centos:linux:6:GA

[root@terras bin]# ls -la /opt/python3/bin/ipython3
-rwxr-xr-x. 1 root root 307 May 27 03:18 /opt/python3/bin/ipython3

[root@terras bin]# ./ipython3
Python 3.3.2 (default, May 26 2013, 23:38:41)
Type "copyright", "credits" or "license" for more information.

IPython 0.13.2 -- 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.

In [1]:
于 2013-05-26T21:50:14.680 回答