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

  • 相关阅读:
    HTML5程序设计--SVG
    visual studio 2012 Github
    排序算法--鸡尾酒排序
    排序算法--归并排序
    排序算法--冒泡排序
    排序算法---插入排序
    外语学习的真实方法及误区
    学习新东西的唯一方法
    如何做好一个面试官——之学习篇
    求职者和面试官如何做好电话面试
  • 原文地址:https://www.cnblogs.com/zhangronghua/p/SolveErrorofComtypes.html
Copyright © 2011-2022 走看看