zoukankan      html  css  js  c++  java
  • AttributeError: 'module' object has no attribute 'RAND_LIMIT_swigconstant

    好久没有来yy了。

    最近在耍openAI,安装些组件的时候出了点问题,也不算是大问题,在https://github.com/openai/gym/issues/100找到了解决方案的,我这里算是记录一下。

    jonasschneider

    One of the only references to this issue that I could dig up is http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/2015q3.txt (grep for swigconstant). For them, SWIG 3.0.6 is failing, while SWIG 3.0.2 is working.

    我当时按照的时候这个小组建已经是3.0.10版本了,报了一样的错误,于是果断的把版本调到3.0.2

    过程如下(用$标记的是输入的命令行):

    $ conda uninstall swig
    $ conda search swig
    Fetching package metadata ...............
    swig                         2.0.10                   py27_0  defaults        
                                 2.0.10                        1  defaults        
                                 3.0.2                         0  defaults        
                                 3.0.8                         0  defaults        
                                 3.0.8                         1  defaults        
                                 3.0.10                        0  defaults        
                                 3.0.12               h38cdd7d_3  defaults        
                                 3.0.12               h38cdd7d_3  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main 
                                 2.0.10                   py27_0  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free 
                                 2.0.10                        1  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free 
                                 3.0.2                         0  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free 
                                 3.0.8                         0  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free 
                                 3.0.8                         1  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free 
                                 3.0.10                        0  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free 
    $ conda install swig=3.0.2

    大概就是这么个情况,如果不行,再把swig安装成3.0.2,然后再把pybox2d组件重装下:

    $ git clone https://github.com/pybox2d/pybox2d.git
    $ cd pybox2d/
    $ python setup.py clean
    $ python setup.py install

    嗯嗯,其他的问题,目前我还不太清楚,可以提出来,大家一起讨论。

  • 相关阅读:
    python的数据类型+常用操作符
    厉害了
    git merge ignore line ending
    CNAME , DNS , A Record , Domain Name

    setcookie无效
    magic quote gpc htmlspecialchars
    整型 浮点型 不能转化
    git push -f带来的conflict如何解决
    git pull --rebase
  • 原文地址:https://www.cnblogs.com/Hocker/p/8045875.html
Copyright © 2011-2022 走看看