pip 安装挂起 (Windows 10) (python 3.10)
Posted
技术标签:
【中文标题】pip 安装挂起 (Windows 10) (python 3.10)【英文标题】:pip installations hang (Windows 10) (python 3.10) 【发布时间】:2021-11-29 07:08:32 【问题描述】:我最近重新安装了 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 安装另外两个库:请求,它有效;和 matplotlib,它没有。
【问题讨论】:
【参考方案1】:我不知道为什么卡住了,但是我看到的是你使用的是python 3.10,它是如此新鲜,以至于我不得不去检查它是否已经发布(它是!5天前!)。
kivy
没有 3.10 的***,因此它试图从源代码构建一个,并且由于缺少 kivy-deps.gstreamer-dev 依赖项而崩溃,该依赖项仅是二进制文件,不适用于 python 3.10 .
我推断,您不太可能使用 python 3.10 安装 kivy
。试试 3.9?
【讨论】:
3.9 有效。谢谢你,互联网人。以上是关于pip 安装挂起 (Windows 10) (python 3.10)的主要内容,如果未能解决你的问题,请参考以下文章
如何修复 pip 在安装 sqlalchemy 时挂起的问题
windows 10 python 2.7和python3.6共存解决方法和pip安装
Windows10下python3和python2同时安装 python2.exepython3.exe和pip2pip3设置