zoukankan      html  css  js  c++  java
  • 解决安装Ulipad时的一个错误

    最近在看<dive in python>,学习的过程中要用到Ulipad这个python ide。所以便去网上下载安装软件安装。安装过程比较顺利,先是安装了python 2.7.1并设置了Path环境变量,然后安装了wyPython2.8,然后再需要安装comtypes 0.6.2就可以了。但是在安装comtypes时却遇到了一个错误,错误信息如下:

    With Python 2.7, DistutilsOptionError was removed from distutils.core, though it still officially remains in distutils.errors. This causes comtypes to not install properly. Instead, an error similar to the following is generated:
    \comtypes> .\setup.py
    Traceback (most recent call last):
    File "\comtypes\setup.py", line 42, in <module>
    from distutils.core import setup, Command, DistutilsOptionError
    ImportError: cannot import name DistutilsOptionError

    解决方法比较简单,给setup.py文件打上以下的patch文件:

    The following patch fixes the issue:
    Index: setup.py
    ===================================================================
    --- setup.py (revision 574)
    +++ setup.py (working copy)
    @@ -39,7 +39,8 @@
    """
    import sys, os
    import ctypes
    -from distutils.core import setup, Command, DistutilsOptionError
    +from distutils.core import setup, Command
    +from distutils.errors import DistutilsOptionError
    try:
    from distutils.command.build_py import build_py_2to3 as build_py

  • 相关阅读:
    SQL如何对时间戳字段按日期排序
    PHP书写SQL换行
    SQL修改字段
    SQL新增一个字段
    HTML加JS实现点击切换“观看”与“收起”效果切换
    盐:深沉的慢动作 让电影“支离破碎”
    笔:最终会走在一起吗
    笔:那个下午
    关于国内安装百夫长开源网站统计进度过慢的问题
    Java Web系列之JDBC
  • 原文地址:https://www.cnblogs.com/zhangronghua/p/SolveErrorofComtypes.html
Copyright © 2011-2022 走看看