如何在win7中安装win7 ipython安装32,并且设置环境变量

博客访问: 478497
博文数量: 131
博客积分: 554
博客等级: 中士
技术积分: 2476
注册时间:
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: Python/Ruby
为了尝试一下IPython的使用,今天折腾了很久的从安装包msi文件安装,最后无法成功运行,无奈在可以连外网的机器windows7 64bit环境,重新安装了一次,为了避免后来人少走弯路,记录安装过程(前提是已经安装了官方的Python环境):
由于是64bit环境的,官方提示最好是从源代码安装,所以首先安装官方的步骤,安装setuptools:
参照页面:http://pypi.python.org/pypi/setuptools,自己选择是32bit还是64bit的windows,这里我下载,运行之后setuptools自动安装好了。
下载IPython最新的源代码包,并解压到本地磁盘。下载地址:/ipython/ipython/downloads
进入cmd,进入解压后的源代码目录,执行命令:python setupegg.py install
执行后,可以看到提示安装成功。IPython会安装到你的Python目录下的scripts下面,我本地是C:\Python27\Scripts\IPython.exe
IPython推荐安装readline,下面安装readline。 同样的去 https://launchpad.net/pyreadline/+download 下载readline源码包,
&&&& 解压后进入源码目录,执行python setup.py install 安装。
最后,为了方便,把IPython的目录加入path环境变量。
emacs IPYTHON
I had the same problem. It has to do with ipython.el not finding the
IPython executable.
To fix it, open ipython.el, and replace line
(when (executable-find "ipython")
(when (executable-find "ipython.bat")
Next, add file ipython.bat to your path containing something like the
following:
C:\Python23\python.exe "C:\Program Files\IPython\IPython_shell.py"
Unfortunately it doesn't seem to work right on windows. The prompts
are missing so it's almost unusable.
Windows XP SP2
Emacs 22.3
ipython 0.9.1
python-mode.el 4.75
ipython.el
these are the steps I needed to get ipython working under emacs
First, to get ipython.el to work you need to edit the ipython.bat file and add a -i flag: i.e.
@C:\Python26\python.exe -i C:\Python26\scripts\ipython.py %*
next, something is broken with the way readline's _outputfile interacts with ipython under emacs/winXP.
I can get IPython working in emacs by modifying line 122 in genutils.py:
if sys.platform == 'win32' and readline.have_readline and (not 'EM_PARENT_PROCESS_ID' in os.environ):
EM_PARENT_PROCESS is a variable inserted into the environment when running processes under emacs.
This tells ipython not to use readline's _outputfile when running under emacs on windows.
NOTE: readline._outputfile is required for proper color display when running ipython from the command shell.
Finally, tab complete is broken under python 2.6 and using my version of ipython.el (may be fixed in the latest version)
In ipython.el, change the value of ipython-completion-command-string to
(defvar ipython-completion-command-string
& "print(';'.join(__IP.Completer.all_completions('%s'))) #PYTHON-MODE SILENT\n"
& "The string send to ipython to query for all possible completions")
This uses 2.6 print() function conventions, and should work with python 2.5 as well.
It also looks as if the history files generated by the emacs IPython and the command prompt ipyt sometimes the emacs IPython will crash with a strange readline error. I've been deleting the _ipython/history file, which is somewhat annoying (but IPython can log sessions easily anyway).
阅读(5392) | 评论(0) | 转发(0) |
相关热门文章
给主人留下些什么吧!~~
请登录后评论。怎么修改Win7环境变量PATH_百度知道博客访问: 228726
博文数量: 115
博客积分: 2207
博客等级: 大尉
技术积分: 2508
注册时间:
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
分类: Python/Ruby
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
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
在http://www.python.org/getit/下载源码包
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 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
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 install
最后发现必须./configure --prefix=/usr/local/也就是指定安装路径
这样重新安装Python2.7 make的时候才不会报_sqlite3模块安装失败
再重新安装easy_install
利用easy_install安装ipython
阅读(3545) | 评论(0) | 转发(1) |
相关热门文章
给主人留下些什么吧!~~
请登录后评论。windows&下安装&ipython
在Windows 下安装iPython 可分为以下几步:
1)下载安装python-2.*.msi(根据ipython支持的版本选择)
http://www.python.org/getit/
C:\Python26
系统属性\环境变量\系统变量\Path 点编辑,将C:\Python26添加到Path
这样可以在Dos下使用python。
2)下载,安装ipython-0.11.win32-setup.exe
http://archive.ipython.org/release/0.11/ipython-0.11.win32-setup.exe
3)下载安装pyreadline-1.7.1.win32.exe(pyreadline库支持命令自动补全功能)
http://pypi.python.org/pypi/pyreadline
Author: Jorgen Stenarson
Documentation: pyreadline package documentation
Home Page: http://ipython.scipy.org/moin/PyReadline/Intro
Download URL: https://launchpad.net/pyreadline/+download
http://launchpad.net/pyreadline/1.7/1.7.1/+download/pyreadline-1.7.1.win32.exe
参考资料:/a/2103040/
/articles/关于ipython的使用安装.html
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

我要回帖

更多关于 win7环境变量 的文章

 

随机推荐