简体   繁体   English

使用pip安装本地软件包时出现问题

[英]problem using pip to install local package

i'm a bit new to python but i need to install a library on a linux machine, im using python 2.7. 我对python有点陌生,但我需要在linux机器上安装一个库,即时通讯使用python 2.7。

The challenge is that I'm behind a firewall and don't have a proxy to do an actual pip install confluent-kafka-python 面临的挑战是我身处防火墙后,没有代理来进行实际的pip install confluent-kafka-python

So i got the confluent-kafka-python.zip from github so i could install offline and did the following: 所以我从github获得了confluent-kafka-python.zip,因此我可以离线安装并执行以下操作:

sudo pip install confluent-kafka-python-master.zip

but i get the following error: 但我得到以下错误:

    Collecting futures (from confluent-kafka==0.11.6)
      Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1846e90>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/futures/
      Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1846390>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/futures/
      ....

what can i do to install this library offline? 我该怎么做才能离线安装该库?

thanks in advance 提前致谢

You have to check your package's dependancies, download them locally (like you did for confluent-kafka), and install them with the '--no-index' option . 您必须检查软件包的依赖关系,在本地下载它们(就像对confluent-kafka所做的那样),并使用'--no-index'选项进行安装

You may also want to check this page for more on installing local packages . 您可能还需要查看此页面,以获取有关安装本地软件包的更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM