pip install python-telegram-bot 不起作用(Arch)

问题描述 投票:0回答:3

我使用 Arch Linux。

我正在尝试执行“pip install”来安装软件包,但无法执行:

❯ pip install python-telegram-bot
Defaulting to user installation because normal site-packages is not writeable
Collecting python-telegram-bot
  Using cached python_telegram_bot-13.12-py3-none-any.whl (511 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/04/cc/f80083270fdab8ba8da3fb89679055dad6f9eb5a060ad63737804cbf1919/python_telegram_bot-13.12-py3-none-any.whl#sha256=08246ecccbb0e7b2ac43d3b545c3bdabc71194b20be9620cd0ed96a2eb66820d (from https://pypi.org/simple/python-telegram-bot/) (requires-python:>=3.6). Requested python-telegram-bot from https://files.pythonhosted.org/packages/04/cc/f80083270fdab8ba8da3fb89679055dad6f9eb5a060ad63737804cbf1919/python_telegram_bot-13.12-py3-none-any.whl#sha256=08246ecccbb0e7b2ac43d3b545c3bdabc71194b20be9620cd0ed96a2eb66820d has inconsistent version: filename has '13.12', but metadata has '13.12'
  Using cached python-telegram-bot-13.12.tar.gz (349 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/3d/41/36e55985839805a9f916aed944686f6edb8db875bafa0da9b4e133d006d4/python-telegram-bot-13.12.tar.gz#sha256=daf55fb6f418b8752317fd12df824dd717e3229a87d83810a4cdd6e442f66de5 (from https://pypi.org/simple/python-telegram-bot/) (requires-python:>=3.6). Requested python-telegram-bot from https://files.pythonhosted.org/packages/3d/41/36e55985839805a9f916aed944686f6edb8db875bafa0da9b4e133d006d4/python-telegram-bot-13.12.tar.gz#sha256=daf55fb6f418b8752317fd12df824dd717e3229a87d83810a4cdd6e442f66de5 has inconsistent version: filename has '13.12', but metadata has '13.12'
  Using cached python_telegram_bot-13.11-py3-none-any.whl (497 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/8f/a5/a18d45dc9bfafa26916dde9b067e031641fd541907950351fedad297ab46/python_telegram_bot-13.11-py3-none-any.whl#sha256=534f5bb0ff4ca34c9252e97e0b3bcdab81d97be0eb4821682a361cb426c00e55 (from https://pypi.org/simple/python-telegram-bot/) (requires-python:>=3.6). Requested python-telegram-bot from https://files.pythonhosted.org/packages/8f/a5/a18d45dc9bfafa26916dde9b067e031641fd541907950351fedad297ab46/python_telegram_bot-13.11-py3-none-any.whl#sha256=534f5bb0ff4ca34c9252e97e0b3bcdab81d97be0eb4821682a361cb426c00e55 has inconsistent version: filename has '13.11', but metadata has '13.11'
  Using cached python-telegram-bot-13.11.tar.gz (343 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/28/be/b90ccd3bdf9dcdf32b9c8cdea1b97de690de70703245605301c1539cab66/python-telegram-bot-13.11.tar.gz#sha256=baeff704baa2ac3dc17a944c02da888228ad258e89be2e5bcbd13a8a5102d573 (from https://pypi.org/simple/python-telegram-bot/) (requires-python:>=3.6). Requested python-telegram-bot from https://files.pythonhosted.org/packages/28/be/b90ccd3bdf9dcdf32b9c8cdea1b97de690de70703245605301c1539cab66/python-telegram-bot-13.11.tar.gz#sha256=baeff704baa2ac3dc17a944c02da888228ad258e89be2e5bcbd13a8a5102d573 has inconsistent version: filename has '13.11', but metadata has '13.11'
  Using cached python_telegram_bot-13.10-py3-none-any.whl (497 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/af/40/9e891037102c1e412e690aea2d0b23dfe405e123aca4d13709d4729b925e/python_telegram_bot-13.10-py3-none-any.whl#sha256=833f39110f5d019b39a6c6fcbabd6ea1627eaaa0a26e618c0be099568672d791 (from https://pypi.org/simple/python-telegram-bot/) (requires-python:>=3.6). Requested python-telegram-bot from https://files.pythonhosted.org/packages/af/40/9e891037102c1e412e690aea2d0b23dfe405e123aca4d13709d4729b925e/python_telegram_bot-13.10-py3-none-any.whl#sha256=833f39110f5d019b39a6c6fcbabd6ea1627eaaa0a26e618c0be099568672d791 has inconsistent version: filename has '13.10', but metadata has '13.10'
  Using cached python-telegram-bot-13.10.tar.gz (342 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/bd/de/2a6d3e9fd8aebb0a8bb4c3fd9e40d3c6b29cdc3c17410caf8df651dfd35f/python-telegram-bot-13.10.tar.gz#sha256=d2c555431821f4ace0c1b7ce12af41999f01b793b275dee131f1034d08c01e3e (from https://pypi.org/simple/python-telegram-bot/) (requires-python:>=3.6). Requested python-telegram-bot from https://files.pythonhosted.org/packages/bd/de/2a6d3e9fd8aebb0a8bb4c3fd9e40d3c6b29cdc3c17410caf8df651dfd35f/python-telegram-bot-13.10.tar.gz#sha256=d2c555431821f4ace0c1b7ce12af41999f01b793b275dee131f1034d08c01e3e has inconsistent version: filename has '13.10', but metadata has '13.10'
  Using cached python_telegram_bot-13.9-py3-none-any.whl (496 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/c4/d6/f5fe95fedbe2a7fd5ca1e60dbba422d7276580990f7006c0ff0e9fd2fde1/python_telegram_bot-13.9-py3-none-any.whl#sha256=a0018979585054f9c8da70198701053705ff1cd2839cc74b2da5371e3ada9ada (from https://pypi.org/simple/python-telegram-bot/) (requires-python:>=3.6). Requested python-telegram-bot from https://files.pythonhosted.org/packages/c4/d6/f5fe95fedbe2a7fd5ca1e60dbba422d7276580990f7006c0ff0e9fd2fde1/python_telegram_bot-13.9-py3-none-any.whl#sha256=a0018979585054f9c8da70198701053705ff1cd2839cc74b2da5371e3ada9ada has inconsistent version: filename has '13.9', but metadata has '13.9'
  Using cached python-telegram-bot-13.9.tar.gz (342 kB)

所以它可以一直持续到版本0(每次“警告”后版本号下降1点)。 怎么了?为什么我不能使用“pip install”?

关于版本:

❯ python -V
Python 3.10.5
❯ pip -V
pip 21.0 from /usr/lib/python3.10/site-packages/pip (python 3.10)
python linux pip archlinux
3个回答
1
投票

Pip 仍然无法工作,而且我没有弄清楚是什么导致了错误,所以我只是从源代码安装了“python-telegram-bot”。

参见:GitHub

$ git clone https://github.com/python-telegram-bot/python-telegram-bot
$ cd python-telegram-bot
$ python setup.py install

这绝对不是一个解决方案,但如果您遇到同样的问题,可以使用它作为替代方案。


0
投票

您是否使用了超级用户权限?尝试切换到 root 用户并重新安装。


0
投票

python -m pip 安装 python-telegram-bot

为我工作。请检查。

© www.soinside.com 2019 - 2024. All rights reserved.