pip 安装挂起 (Windows 10) (python 3.10)

pip installations hang (Windows 10) (python 3.10)

我最近重新安装了 python 因为导入和虚拟环境发生了奇怪的事情。

现在,当我尝试安装库时——例如 kivy——发生了这种情况:

(env) C:\Users\Marcels friend\Desktop\sdf>py -m pip install kivy[base] kivy_examples
Collecting kivy[base]
  Using cached Kivy-2.0.0.tar.gz (23.7 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\Marcels friend\Desktop\sdf\env\Scripts\python.exe' 'C:\Users\Marcels friend\AppData\Local\Temp\pip-standalone-pip-820ai__z\__env_pip__.zip\pip' install --ignore-installed --no-user --prefix 'C:\Users\Marcels friend\AppData\Local\Temp\pip-build-env-p3plnhu0\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.24,<=0.29.21,!=0.27,!=0.27.2' 'kivy_deps.gstreamer_dev~=0.3.1; sys_platform == "win32"' 'kivy_deps.sdl2_dev~=0.3.1; sys_platform == "win32"' 'kivy_deps.glew_dev~=0.3.0; sys_platform == "win32"' 'kivy_deps.gstreamer~=0.3.1; sys_platform == "win32"' 'kivy_deps.sdl2~=0.3.1; sys_platform == "win32"' 'kivy_deps.glew~=0.3.0; sys_platform == "win32"'
       cwd: None
  Complete output (10 lines):
  Collecting setuptools
    Using cached setuptools-58.2.0-py3-none-any.whl (946 kB)
  Collecting wheel
    Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
  Collecting cython!=0.27,!=0.27.2,<=0.29.21,>=0.24
    Using cached Cython-0.29.21-py2.py3-none-any.whl (974 kB)
  ERROR: Could not find a version that satisfies the requirement kivy_deps.gstreamer_dev~=0.3.1 (from versions: none)
  ERROR: No matching distribution found for kivy_deps.gstreamer_dev~=0.3.1
  WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
  You should consider upgrading via the 'C:\Users\Marcels friend\Desktop\sdf\env\Scripts\python.exe -m pip install --upgrade pip' command.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/12/96/091ddacafb84dd18555a32d860dbfaf9c806147aa30c6f3c8b93cb7bab97/Kivy-2.0.0.tar.gz#sha256=d25e44eb44e43762b2fd0c5874e51954e0f1181fd9800d8a6756be6d084812d8 (from https://pypi.org/simple/kivy/). Command errored out with exit status 1: 'C:\Users\Marcels friend\Desktop\sdf\env\Scripts\python.exe' 'C:\Users\Marcels friend\AppData\Local\Temp\pip-standalone-pip-820ai__z\__env_pip__.zip\pip' install --ignore-installed --no-user --prefix 'C:\Users\Marcels friend\AppData\Local\Temp\pip-build-env-p3plnhu0\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.24,<=0.29.21,!=0.27,!=0.27.2' 'kivy_deps.gstreamer_dev~=0.3.1; sys_platform == "win32"' 'kivy_deps.sdl2_dev~=0.3.1; sys_platform == "win32"' 'kivy_deps.glew_dev~=0.3.0; sys_platform == "win32"' 'kivy_deps.gstreamer~=0.3.1; sys_platform == "win32"' 'kivy_deps.sdl2~=0.3.1; sys_platform == "win32"' 'kivy_deps.glew~=0.3.0; sys_platform == "win32"' Check the logs for full command output.
  Using cached Kivy-1.11.1.tar.gz (23.6 MB)

到这里就卡住了。不管我是在虚拟环境中还是在虚拟环境之外进行操作都没有关系。我尝试过 pip 安装另外两个库:requests,有效;和 matplotlib,后者没有。

我不知道为什么会卡,但我看到你用的是python3.10,太新鲜了,我不得不去看看它是否已经发布(是!5 天前!)。

kivy 没有 3.10 的轮子,所以它试图从源代码构建一个,但由于缺少 kivy-deps.gstreamer-dev 依赖项而崩溃,它只是二进制文件python 3.10 不可用。

我推断,您不太可能用 python 3.10 安装 kivy。试试 3.9?