gpt4 book ai didi

python-3.x - pynput pip3 安装错误 : Could not find a version that satisfies the requirement pynput (from versions: none)

转载 作者:行者123 更新时间:2023-12-05 07:06:49 26 4
gpt4 key购买 nike

大师们,

我正在尝试在 python 3.5 和 python 3.7 中安装 pynput

https://pypi.org/project/pynput/#files

pip3 install pynput

但是得到如下错误信息:

Looking in indexes: https://nexus3.marqeta.com/repository/pypi-all/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x106574b00>: Failed to establish a new connection: [Errno 61] Connection refused',)': /repository/pypi-all/simple/pynput/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x106574e80>: Failed to establish a new connection: [Errno 61] Connection refused',)': /repository/pypi-all/simple/pynput/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x106574278>: Failed to establish a new connection: [Errno 61] Connection refused',)': /repository/pypi-all/simple/pynput/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x106574b70>: Failed to establish a new connection: [Errno 61] Connection refused',)': /repository/pypi-all/simple/pynput/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x1065749e8>: Failed to establish a new connection: [Errno 61] Connection refused',)': /repository/pypi-all/simple/pynput/
ERROR: Could not find a version that satisfies the requirement pynput (from versions: none)
ERROR: No matching distribution found for pynput

如果我这样做

pip 安装 "git+ https://github.com/moses-palmer/pynput "

Looking in indexes: https://nexus3.marqeta.com/repository/pypi-all/simple
Collecting git+https://github.com/moses-palmer/pynput
Cloning https://github.com/moses-palmer/pynput to /private/var/folders/3g/zck82mw91_ddjhk88nxt8t6ny40bl_/T/pip-req-build-y2gvuewk
Running command git clone -q https://github.com/moses-palmer/pynput /private/var/folders/3g/zck82mw91_ddjhk88nxt8t6ny40bl_/T/pip-req-build-y2gvuewk
Requirement already satisfied: six in /Users/psu/miniconda3/lib/python3.5/site-packages (from pynput==1.6.8) (1.14.0)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x10d231470>: Failed to establish a new connection: [Errno 61] Connection refused',)': /repository/pypi-all/simple/pyobjc-framework-quartz/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x10d231cc0>: Failed to establish a new connection: [Errno 61] Connection refused',)': /repository/pypi-all/simple/pyobjc-framework-quartz/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x10d2318d0>: Failed to establish a new connection: [Errno 61] Connection refused',)': /repository/pypi-all/simple/pyobjc-framework-quartz/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x10d2319b0>: Failed to establish a new connection: [Errno 61] Connection refused',)': /repository/pypi-all/simple/pyobjc-framework-quartz/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x10d231208>: Failed to establish a new connection: [Errno 61] Connection refused',)': /repository/pypi-all/simple/pyobjc-framework-quartz/
ERROR: Could not find a version that satisfies the requirement pyobjc-framework-Quartz>=3.0 (from pynput==1.6.8) (from versions: none)
ERROR: No matching distribution found for pyobjc-framework-Quartz>=3.0 (from pynput==1.6.8)

我也尝试了一些 sys.path.append hack,但它也不起作用

sys.path.append("$HOME/repos/pynput/lib")

import pynput.mouse.Listener

它会说

  File "$HOME/repos/pynput/lib/pynput/mouse/__init__.py", line 26, in <module>
from pynput._util import backend, Events
ModuleNotFoundError: No module named 'pynput'

有什么想法吗?谢谢。

最佳答案

在安装pynput之前你必须安装pyobjc-framework-Quartz

试试这个:

python3 -m pip install pyobjc-framework-Quartz==8.4.1 pynput==1.7.6

关于python-3.x - pynput pip3 安装错误 : Could not find a version that satisfies the requirement pynput (from versions: none),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62370138/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com