windows 64位下Python2.7.5+Ulipad安装及错误解决办法

一、安装Python2.7+Ulipad

1、首先安装Python
  Python 下载地址:http://www.python.org/getit/

  我们这里使用的版本是 Python 2.7.5 Windows X86-64 Installer

  双击安装,我们安装到 D:\Python27(自己决定) 

2、安装Ulipad
      
    这里我们使用的版本是ulipad.4.2.py26.exe

       双击安装,我们安装到 D:\Ulipad(自己决定)

3、安装 wxPython 模块


  我们这里选择 wxPython2.8-win64-unicode-py27 它对应的是 Python 2.7版本。

       双击安装。

4、安装comtypes模块


  目前最新版本 comtypes-0.6.2.win32.exe ,双击安装。

5、UliPad执行

  在Ulipad目录下,双击UliPad.exe 可以执行并打开Ulipad编辑器。

6、配置Ulipad

  打开Ulipad,选择菜单=>编辑=>参数=>Python=>设置Python解释器=>增加

  输入解释器路径 可以手动选择Python安装文件夹下的python.exe文件 描述设置为2.7 console

  再新增个Python文件夹下的Pythonw.exe 描述为2.7 window 。最后确定完成。

二、常见错误及解决办法

1.安装comtypes模块报告找不到Python目录
       
       即不能识别出python2.7

       解决方法:
     
       ①新建register.py文件,并在文件中粘贴如下代码(参考 http://www.cnblogs.com/min0208/archive/2012/05/24/2515584.html )   
       
#
# script to register Python 2.0 or later for use with win32all
# and other extensions that require Python registry settings
#
# written by Joakim Loew for Secret Labs AB / PythonWare
#
# source:
# http://www.pythonware.com/products/works/articles/regpy20.htm
#
# modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html
import sys
from _winreg import *
# tweak as necessary
version = sys.version[:3]
installpath = sys.prefix
regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % (
    installpath, installpath, installpath
)
def RegisterPy():
    try:
        reg = OpenKey(HKEY_CURRENT_USER, regpath)
    except EnvironmentError as e:
        try:
            reg = CreateKey(HKEY_CURRENT_USER, regpath)
            SetValue(reg, installkey, REG_SZ, installpath)
            SetValue(reg, pythonkey, REG_SZ, pythonpath)
            CloseKey(reg)
        except:
            print "*** Unable to register!"
            return
        print "--- Python", version, "is now registered!"
        return
    if (QueryValue(reg, installkey) == installpath and
        QueryValue(reg, pythonkey) == pythonpath):
        CloseKey(reg)
        print "=== Python", version, "is already registered!"
        return
    CloseKey(reg)
    print "*** Unable to register!"
    print "*** You probably have another Python installation!"
if __name__ == "__main__":
    RegisterPy()

       保存并复制到根目录下面。
       ②打开命令行窗口定位到D盘,然后输入 python register.py 然后显示 “Python 2.7 is already registered!”.

       ③然后再安装comtypes就可以识别出Python2.7.

2.命令行窗口中python不是内部命令
     
       解决办法:
     
       假设python安装在D:\python27。

       我的电脑->属性->高级->环境变量->系统变量 中在PATH加上 D:\Python27(注意分号) 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值