1.Windows安装忘记了
下载安装python安装工具
下载地址: 可以找到正确的版本进行下载。win7 32位可以下载setuptools-0.6c11.win32-py2.7.exe 。 注意:win7 64位必须使用进行安装。方法是下载ez_setup.py后,在cmd下执行 python ez_setup.py,即可自动安装setuptools。目前没有直接的exe安装版本。
下载完成后双击执行安装文件,即可在D:\Program Files\python2.7\scripts下安装easy_install。包含一个easy_install.exe,然后进行环境变量设置,在系统环境变量中做如下设置:
(也就是将D:\Program Files\python2.7\scripts添加到环境变量中)
此时可以在控制台看easy_install 是否安装上了。
Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\zhuyupeng>easy_install
error: No urls, filenames, or requirements specified (see --help)
上面这种方式不正确,需要使用下面的方式:
C:\Users\zhuyupeng>easy_install virtualenv
Searching for virtualenv
Best match: virtualenv 1.7.2
Processing virtualenv-1.7.2-py2.7.egg
virtualenv 1.7.2 is already the active version in easy-install.pth
Installing virtualenv-script.py script to D:\Program Files\Python2.7\Scripts
Installing virtualenv.exe script to D:\Program Files\Python2.7\Scripts
Installing virtualenv.exe.manifest script to D:\Program Files\Python2.7\Scripts
Installing virtualenv-2.7-script.py script to D:\Program Files\Python2.7\Scripts
Installing virtualenv-2.7.exe script to D:\Program Files\Python2.7\Scripts
Installing virtualenv-2.7.exe.manifest script to D:\Program Files\Python2.7\Scri
pts
Using d:\program files\python2.7\lib\site-packages\virtualenv-1.7.2-py2.7.egg
Processing dependencies for virtualenv
Finished processing dependencies for virtualenv
2.先说说我的机器情况,python 预装版本为2.4.3
在下载源码包
-
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
编译Python 2.7.3版本
-
tar czvf Python-2.7.3.tgz
-
cd Python-2.7.3
-
./configure --prefix=/home/yesg/
-
make
-
make install
采用easy_install 来安装ipython
需要先安装easy_install
先下载easy_install源码
-
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
安装easy_install
-
tar xzvf setuptools-0.6c11.tar.gz
-
cd setuptools-0.6c11
-
python2.7 setup.py install
使用easy_install-2.7安装ipython
运行ipython查看成果
-
WARNING: IPython History requires SQLite, your history will not be saved
-
WARNING: Readline services not available or not loaded.WARNING: The auto-indent feature requires the readline libraryPython 2.7.3 (default, Dec 11 2012, 23:01:21)
悲剧啊
重新安装sqlite3
-
wget http://www.sqlite.org/sqlite-autoconf-3071401.tar.gz
-
tar xzvf sqlite-autoconf-3071401.tar.gz
-
cd sqlite-autoconf-3071401
-
./configure --prefix=/usr/local/
-
make
-
make install
最后发现必须
./configure --prefix=/usr/local/也就是指定安装路径
这样重新安装Python2.7 make的时候才不会报_sqlite3模块安装失败
再重新安装easy_install
利用easy_install安装ipython
阅读(5426) | 评论(0) | 转发(1) |