【问题标题】:Python: Kivy throws an exception when trying to install it with pipPython:尝试使用 pip 安装 Kivy 时抛出异常
【发布时间】:2018-03-16 15:22:43
【问题描述】:

我目前正在尝试将 kivy 安装到 python 3.6,但是当我尝试安装它时会引发以下异常:

C:\Users\magshimim\Desktop\notKivy>python -m pip install kivy

 Collecting kivy

   Using cached 

https://files.pythonhosted.org/packages/29/e6/e07f77a8d85a626bb955fe072d41042c4c
ee6deaca61295f1c08e6407097/Kivy-1.10.0-cp36-cp36m-win32.whl Collecting Kivy-Garden>=0.1.4 (from kivy)
  Using cached https://files.pythonhosted.org/packages/7d/68/decaee596ff8168a39432eb3949fc7c0be952ebb9467806823bffc165d48/kivy-garden-0.1.4.tar.gz
Requirement already satisfied: docutils in c:\python36\lib\site-packages (from kivy)
Requirement already satisfied: pygments in c:\python36\lib\site-packages (from kivy)
Requirement already satisfied: requests in c:\python36\lib\site-packages (from Kivy-Garden>=0.1.4->kivy)
Exception:
Traceback (most recent call last):
  File "C:\Python36\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "C:\Python36\lib\site-packages\pip\commands\install.py", line 335, in run
    wb.build(autobuilding=True)
  File "C:\Python36\lib\site-packages\pip\wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "C:\Python36\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "C:\Python36\lib\site-packages\pip\req\req_set.py", line 666, in _prepare_file
    check_dist_requires_python(dist)
  File "C:\Python36\lib\site-packages\pip\utils\packaging.py", line 48, in check_dist_requires_python
    feed_parser.feed(metadata)
  File "C:\Python36\lib\email\feedparser.py", line 175, in feed
    self._input.push(data)
  File "C:\Python36\lib\email\feedparser.py", line 103, in push
    self._partial.write(data)
TypeError: string argument expected, got 'NoneType'

有什么帮助吗?

【问题讨论】:

    标签: python python-3.x pip installation kivy


    【解决方案1】:

    试试吧:

    pip install kivy
    

    在我的 Windows 机器上为我工作。确保 pip 在您机器上的 Path 环境变量中。

    【讨论】:

    • python -m pip install kivypip install kivy 有何不同?
    猜你喜欢
    • 2017-07-08
    • 1970-01-01
    • 1970-01-01
    • 2022-01-21
    • 2019-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多