kivy的安装步骤

参考的网址:

传送门

User’s Guide » Installation on Windows

Beginning with 1.9.1 we provide binarywheelsfor Kivy and all its dependencies to be used with an existing Pythoninstallation. SeeInstallation.

We also provide nightly wheels generated using Kivymaster. SeeNightly wheel installation.See also Upgrading from a previous Kivy dist. If installing kivy to analternatelocation and not to site-packages, please see Installing Kivy to an alternate location.

Note

For Python < 3.5 we use the MinGW compiler. However, for Python 3.5+ onWindows we currently only support the MSVC compilerbecause of the following Pythonissue 4709 about MinGW.Generally this should make no difference when using precompiled wheels.

To use Kivy you need Python.Multiple versions of Python can be installed side by side, but Kivy needs tobe installed for each Python version that you want to use Kivy.

Installation

建议安装的过程中: pip 的时候后面都加上这句: -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

Now that python is installed, open the Command line and make surepython is available by typingpython --version. Then, do the following toinstall.

  1. Ensure you have the latest pip and wheel:

    python -m pip install --upgrade pip wheel setuptools
    
  2. Install the dependencies (skip gstreamer (~120MB) if not needed, seeKivy’s dependencies):

    python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
    python -m pip install kivy.deps.gstreamer
    

    For Python 3.5 only we additionally offer angle which can be used instead of glewand can be installed with:

    python -m pip install kivy.deps.angle
    
  3. Install kivy:

    python -m pip install kivy
    
  4. (Optionally) Install the kivy examples:

    python -m pip install kivy_examples
    

    The examples are installed in the share directory under the root directory where python is installed.

That’s it. You should now be able to import kivy in python or run a basicexample if you installed the kivy examples:

python share\kivy-examples\demo\showcase\main.py

Note

If you encounter any permission denied errors, try opening theCommand prompt as administratorand trying again.

What are wheels, pip and wheel

In Python, packages such as Kivy can be installed with the python packagemanager,pip. Some packages such as Kivyrequire additional steps, such as compilation, when installing using the Kivysource code with pip. Wheels (with a.whl extension) are pre-builtdistributions of a package that has already been compiled and do not requireadditional steps to install.

When hosted on pypi one installs a wheelusing pip, e.g.python -m pip install kivy. When downloading andinstalling a wheel directly, python -m pipinstall wheel_file_name is used,such as:

python -m pip install C:\Kivy-1.9.1.dev-cp27-none-win_amd64.whl  
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

软件测试技术

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值