I use Arch Linux.
I’m trying to execute "pip install" to install packages and can’t do it:
❯ 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)
So it can continue until version 0 (after each "WARNING" the version number drops by 1 point).
What’s wrong? Why I can’t use "pip install"?
About versions:
❯ python -V
Python 3.10.5
❯ pip -V
pip 21.0 from /usr/lib/python3.10/site-packages/pip (python 3.10)
2
Answers
Pip still doesn't work, and I didn't figure out what was causing the error, so I just installed "python-telegram-bot" from source.
See: GitHub
This is definitely not a solution, but you can use it as an alternative if you're having the same issue.
Did you use superuser permission ? Try switch to root user and install again.