配置worldmodels的环境问题

在服务器上配置worldmodels上出现的问题

  • AttributeError: module ‘_Box2D’ has no attribute ‘RAND_LIMIT_swigconstant’
pip3 install box2d box2d-kengz
$ 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
$ git clone https://github.com/pybox2d/pybox2d.git
$ cd pybox2d/
$ python setup.py clean
$ python setup.py install
  • pyglet.gl.glx_info.GLXInfoException: pyglet requires an X server with GLX”“

图形界面的问题,最好还是在服务器上用图形界面跑程序
如果是ubuntu系统:
sudo apt-get install libgl1-mesa-swx11
如果是centos系统:
可能要重新安装显卡,然而没什么用,最后还是直接在display上跑的
nivdia –no opengl
https://davidsanwald.github.io/2016/11/13/building-tensorflow-with-gpu-support.html
https://gist.github.com/8enmann/931ec2a9dc45fde871d2139a7d1f2d78

from scipy.misc import imread,imresize 
ImportError: cannot import name imread

解决方案:

需要install PIL or Pillow.

pip install 之后显示正确。

import Box2D
ModuleNotFoundError: No module named 'Box2D'

可以先uninstall已有版本(如有),然后安装pybox2d:
pip uninstall Box2D-kengz
git clone https://github.com/pybox2d/pybox2d.git
cd pybox2d
python setup.py clean
python setup.py install
但是会出现

error: command 'swig.exe' failed: No such file or directory

需要安装swig

1.下载Swig for Windows:http://www.swig.org/download.html
2 解压 .zip 文件到目录,比如:D:\backupsoftware

3 添加环境变量到path, 比如: D:\backupsoftware\swigwin-2.0.9
4. Python
PYTHON_INCLUDE : Set this to the directory that contains Python.h
PYTHON_LIB : Set this to the python library including path for linking

Example using Python 2.1.1:
PYTHON_INCLUDE: D:\python21\include
PYTHON_LIB: D:\python21\libs\python21.lib

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++                        Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

一定要安装和自己windows版本和python版本对应的第三方库。

推荐在:http://www.lfd.uci.edu/~gohlke/pythonlibs下载
后直接 pip install XXX

或者安装c++14.0 比较慢

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值