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

  • 相关阅读:
    Android之动态图片
    Java之简单图形面积计算
    Java之姐妹素数
    Java之经典Student问题2
    数据库事务四大特性
    TCP/IP分层
    海量数据问题处理办法
    36个常见java面试题
    【19】【滑动窗口】【栽跟头】最长不重复子字符串
    一些面试题
  • 原文地址:https://www.cnblogs.com/zhangronghua/p/SolveErrorofComtypes.html
Copyright © 2011-2022 走看看