1

我尝试python-telegram-bot使用此处找到的说明进行安装。

当我运行时python setup.py install,出现以下错误:

creating 'dist/python_telegram_bot-5.2.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing python_telegram_bot-5.2.0-py2.7.egg
Copying python_telegram_bot-5.2.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding python-telegram-bot 5.2.0 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/python_telegram_bot-5.2.0-py2.7.egg
Processing dependencies for python-telegram-bot==5.2.0
Searching for certifi
Reading https://pypi.python.org/simple/certifi/
Download error on https://pypi.python.org/simple/certifi/: [Errno 101] Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'certifi' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno 101] Network is unreachable -- Some packages may not be found!
No local packages or download links found for certifi
error: Could not find suitable distribution for Requirement.parse('certifi')

我可以通过网络代理访问 Internet,我可以wgetgit工作正常。我已经设置环境网络代理用户名,密码变量在.bashrc.

如何解决这个问题呢?

4

1 回答 1

0

当我尝试安装 Matplotlib 工具时,我遇到了类似的错误,“找不到 'certifi' 的索引页”。我的解决方案是通过pip install certifi.

我的运行环境:
  操作系统:Ubuntu 16.04
  Python 3.6
  硬件:Nvidia TX2

于 2021-08-31T00:02:31.940 回答