我正在使用python2.7并创建了一个虚拟环境“ kivyenv”。首先,我安装Cython,然后在kivyenv中进行kivy。
pip install Cython
pip install kivy
Run Code Online (Sandbox Code Playgroud)
kivy安装失败,出现了一些错误:-
In file included from /tmp/pip-build-4T9oG4/kivy/kivy/graphics/opengl.c:274:0:
/tmp/pip-build-4T9oG4/kivy/kivy/graphics/gl_redirect.h:43:22: fatal error: GL/gl.h: No such file or directory
# include <GL/gl.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/root/kivyenv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4T9oG4/kivy/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-3__DxE-record/install-record.txt --single-version-externally-managed --compile --install-headers
/root/kivyenv/include/site/python2.7/kivy" failed with error code 1 in /tmp/pip-build-4T9oG4/kivy/
Run Code Online (Sandbox Code Playgroud)
我正在使用Ubuntu 16。
我正在建立基于 django 的网站。我在导航栏中使用引导下拉菜单来折叠低分辨率(即移动视图)上的导航栏,但单击按钮导航栏不会出现下拉菜单。
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<nav id="main-menu" class="navbar" role="navigation">
<div class="navbar-header">
<button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse"
data-target=".navbar-cat-collapse">
<span class="sr-only">Toggle Navigation</span>
<i class="fa fa-bars"></i>
</button>
</div>
<div class="collapse navbar-collapse navbar-cat-collapse">
<ul class="nav navbar-nav">
<li><a href="{% url 'home_page' %}">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Pages</a></li>
<li><a href="{% url 'contact_page' %}">Contact Us</a></li>
</ul>
</div>
</nav>
Run Code Online (Sandbox Code Playgroud)