简体   繁体   English

虚拟环境中出现异常,窗口提供程序错误(Linux)

[英]kivy in virtual environment, window provider error (linux)

I am trying to get the kivy framework to run on a Ubuntu 16.04 LTS machine with anaconda python. 我试图让kivy框架在带有anaconda python的Ubuntu 16.04 LTS机器上运行。

I have followed the installation instructions provided here both in virtualenv and conda virtualenv environments. 我已遵循在virtualenv和conda virtualenv环境中此处提供的安装说明。

In both kinds of environments I encountered the same issue. 在两种环境中,我都遇到相同的问题。 When trying to run a kivy program with python file.py I get (among others) the following messages and the program doesn't execute: 尝试使用python file.py运行kivy程序时,(除其他外)我收到以下消息,但该程序未执行:

    [INFO   ] [Kivy        ] v1.9.1
    [INFO   ] [Python      ] v2.7.12 (default, [...]) 
    [GCC 5.4.0 ...]
    [INFO   ] [Factory     ] 179 symbols loaded
    [INFO   ] [Image       ] Providers: img_tex, img_dds, img_gif (img_sdl2, img_pil, img_ffpyplayer ignored)
    [CRITICAL] [Window      ] Unable to find any valuable Window provider at all!
    egl_rpi - ImportError: cannot import name bcm
...

However, when I run a file from an interactive python session using execfile('file.py') it works without problems. 但是,当我使用execfile('file.py')从交互式python会话运行文件时,它可以正常工作。

Does anyone know how to resolve this issue? 有谁知道如何解决这个问题?

Are you sure you had a clean installation? 您确定安装干净吗? try this in your virtual environment: 在您的虚拟环境中尝试以下操作:

hg clone https://bitbucket.org/pygame/pygame
cd pygame
python setup.py build
python setup.py install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM