首页 > 解决方案 > pynput pip3 安装错误:找不到满足要求的版本 pynput(来自版本:无)

问题描述

大师们,

我正在尝试在 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

如果我做

点安装“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'

有什么想法吗?谢谢。

标签: python-3.xpynput

解决方案


推荐阅读