最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

【已解决】pip install失败:Failed to establish a new connection Errno -2 Name or service not known

Python crifan 3988浏览 0评论
(RunningFast) ➜  stable pip install boto3
Collecting boto3
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f30c47e8710>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/boto3/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f30c306b550>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/boto3/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f30c306b950>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/boto3/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f30c306b610>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/boto3/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f30c306b5d0>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/boto3/
  Could not find a version that satisfies the requirement boto3 (from versions: )
No matching distribution found for boto3

Failed to establish a new connection Errno -2  Name or service not known

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f30c47e8710>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/boto3/

pip install Failed to establish a new connection Errno -2  Name or service not known

pip install Retrying  Retry total

NewConnectionError · Issue #3899 · pypa/pip · GitHub

pip 6.0 unconditionally uses the network to check for update · Issue #2269 · pypa/pip · GitHub

chef – Connection to pypi.python.org timed out – Stack Overflow

pip install Retrying  Retry total after connection broken by NewConnectionError

pip search更是出错:

(RunningFast) ➜  stable pip search boto
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f12e6e4e3d0>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /pypi
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f12e6e4e550>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /pypi
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f12e6e4e5d0>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /pypi
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f12e6e4e750>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /pypi
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f12e6e4e8d0>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /pypi
Exception:
Traceback (most recent call last):
  File “/root/Envs/RunningFast/lib/python2.7/site-packages/pip/basecommand.py”, line 215, in main
    status = self.run(options, args)
  File “/root/Envs/RunningFast/lib/python2.7/site-packages/pip/commands/search.py”, line 43, in run
    pypi_hits = self.search(query, options)
  File “/root/Envs/RunningFast/lib/python2.7/site-packages/pip/commands/search.py”, line 60, in search
    hits = pypi.search({‘name’: query, ‘summary’: query}, ‘or’)
  File “/usr/local/lib/python2.7/xmlrpclib.py”, line 1243, in __call__
    return self.__send(self.__name, args)
  File “/usr/local/lib/python2.7/xmlrpclib.py”, line 1602, in __request
    verbose=self.__verbose
  File “/root/Envs/RunningFast/lib/python2.7/site-packages/pip/download.py”, line 764, in request
    headers=headers, stream=True)
  File “/root/Envs/RunningFast/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py”, line 518, in post
    return self.request(‘POST’, url, data=data, json=json, **kwargs)
  File “/root/Envs/RunningFast/lib/python2.7/site-packages/pip/download.py”, line 378, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File “/root/Envs/RunningFast/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py”, line 475, in request
    resp = self.send(prep, **send_kwargs)
  File “/root/Envs/RunningFast/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py”, line 585, in send
    r = adapter.send(request, **kwargs)
  File “/root/Envs/RunningFast/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.py”, line 46, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File “/root/Envs/RunningFast/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py”, line 467, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host=’pypi.python.org’, port=443): Max retries exceeded with url: /pypi (Caused by NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f12e6e4ea10>: Failed to establish a new connection: [Errno -2] Name or service not known’,))
(RunningFast) ➜  stable

Pip Proxy Error – Stack Overflow

(RunningFast) ➜  stable pip –version
pip 8.1.2 from /root/Envs/RunningFast/lib/python2.7/site-packages (python 2.7)
(RunningFast) ➜  stable pip install –upgrade pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1308a65050>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1308a651d0>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1308a65350>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1308a654d0>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1308a65650>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/pip/
Requirement already up-to-date: pip in /root/Envs/RunningFast/lib/python2.7/site-packages

linux – I can ping but cannot download from the internet – Super User

(RunningFast) ➜  stable echo $http_proxy
(RunningFast) ➜  stable echo $https_proxy

pip install after connection broken by NewConnectionError

算了。暂时放弃。

尝试

自己下载包,从本地安装。

GitHub – boto/boto3 at 1.4.2

结果出错:

(RunningFast) ➜  stable rz
rz waiting to receive.
Starting zmodem transfer.  Press Ctrl+C to cancel.
Transferring boto3-1.4.2.zip…
  100%     291 KB     291 KB/sec    00:00:01       0 Errors  
(RunningFast) ➜  stable ll
total 404K
-rw-r–r– 1 root root 1.5K Nov 10 15:20 api_manual.md
-rw-r–r– 1 root root 292K Dec 13 22:00 boto3-1.4.2.zip
-rw-r–r– 1 root root 1.1K Dec 13 21:11 config.py
-rw-r–r– 1 root root  575 Dec 13 21:12 config.pyc
-rw-r–r– 1 root root 2.4K Oct 18 09:48 db_create.py
-rw-r–r– 1 root root  383 Oct 17 21:59 db_manager.py
drwxr-xr-x 2 root root 4.0K Oct 18 14:36 instance
drwxr-xr-x 2 root root 4.0K Dec 12 18:15 logs
drwxr-xr-x 3 root root 4.0K Oct 18 14:36 migrations
-rw-r–r– 1 root root 3.3K Nov 11 15:40 README.md
-rw-r–r– 1 root root  46K Sep  3 21:59 redis.conf
-rw-r–r– 1 root root  605 Nov 10 15:30 requirements.txt
drwxr-xr-x 6 root root 4.0K Dec 13 21:12 runningfast
-rw-r–r– 1 root root  516 Nov  1 10:50 run.py
-rw-r–r– 1 root root  600 Nov  1 10:56 run.pyc
-rw-r–r– 1 root root 9.3K Nov  4 14:39 supervisor.conf
(RunningFast) ➜  stable ls boto3-1.4.2.zip
boto3-1.4.2.zip
(RunningFast) ➜  stable pwd
/root/RunningFast/stable
(RunningFast) ➜  stable pip install boto3 –no-index –find-links file:///root/RunningFast/stable/boto3-1.4.2.zip
Ignoring indexes: https://pypi.python.org/simple
Collecting boto3
Collecting botocore<1.5.0,>=1.4.1 (from boto3)
  Could not find a version that satisfies the requirement botocore<1.5.0,>=1.4.1 (from boto3) (from versions: )
No matching distribution found for botocore<1.5.0,>=1.4.1 (from boto3)

需要:

botocore

然后去:

unzip boto3-1.4.2.zip

cd boto3-1.4.2

python setup.py install

但是还是失败:

(RunningFast) ➜  boto3-1.4.2 python setup.py install
running install
running bdist_egg
running egg_info
creating boto3.egg-info
writing requirements to boto3.egg-info/requires.txt
writing boto3.egg-info/PKG-INFO
writing top-level names to boto3.egg-info/top_level.txt
writing dependency_links to boto3.egg-info/dependency_links.txt
writing manifest file ‘boto3.egg-info/SOURCES.txt’
reading manifest file ‘boto3.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
writing manifest file ‘boto3.egg-info/SOURCES.txt’
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/boto3
copying boto3/exceptions.py -> build/lib/boto3
copying boto3/utils.py -> 
。。。
byte-compiling build/bdist.linux-x86_64/egg/boto3/resources/collection.py to collection.pyc
byte-compiling build/bdist.linux-x86_64/egg/boto3/compat.py to compat.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying boto3.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying boto3.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying boto3.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying boto3.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying boto3.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents…
boto3.session: module references __file__
boto3.docs.service: module references __file__
creating dist
creating ‘dist/boto3-1.4.2-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 boto3-1.4.2-py2.7.egg
creating /root/Envs/RunningFast/lib/python2.7/site-packages/boto3-1.4.2-py2.7.egg
Extracting boto3-1.4.2-py2.7.egg to /root/Envs/RunningFast/lib/python2.7/site-packages
Adding boto3 1.4.2 to easy-install.pth file
Installed /root/Envs/RunningFast/lib/python2.7/site-packages/boto3-1.4.2-py2.7.egg
Processing dependencies for boto3==1.4.2
Searching for s3transfer<0.2.0,>=0.1.0
Reading https://pypi.python.org/simple/s3transfer/
Downloading https://pypi.python.org/packages/e6/e0/61bf352050b0d687755cd1a41ead378e6b1b48f8754076c413e816fcc1ee/s3transfer-0.1.9.tar.gz#md5=036d467e77e0d4dfa65448d63a9208bc
Best match: s3transfer 0.1.9
Processing s3transfer-0.1.9.tar.gz
Writing /tmp/easy_install-8AcA4k/s3transfer-0.1.9/setup.cfg
Running s3transfer-0.1.9/setup.py -q bdist_egg –dist-dir /tmp/easy_install-8AcA4k/s3transfer-0.1.9/egg-dist-tmp-HphqRg
zip_safe flag not set; analyzing archive contents…
Moving s3transfer-0.1.9-py2.7.egg to /root/Envs/RunningFast/lib/python2.7/site-packages
Adding s3transfer 0.1.9 to easy-install.pth file
Installed /root/Envs/RunningFast/lib/python2.7/site-packages/s3transfer-0.1.9-py2.7.egg
Searching for jmespath<1.0.0,>=0.7.1
Reading https://pypi.python.org/simple/jmespath/
Download error on https://pypi.python.org/simple/jmespath/: [Errno -2] Name or service not known — Some packages may not be found!
Couldn’t find index page for ‘jmespath’ (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 -2] Name or service not known — Some packages may not be found!
No local packages or working download links found for jmespath<1.0.0,>=0.7.1
error: Could not find suitable distribution for Requirement.parse(‘jmespath<1.0.0,>=0.7.1’)
(RunningFast) ➜  boto3-1.4.2

换了个时间,结果又好了:

(RunningFast) ➜  staging pip search boto
bchelpers (0.3.0)                   – Handy helpers to make botocore easier to use
hazinses (0.5.2)                    – A simple Django app for connecting AMAZON SES-CELERY AND BOTO.
tornado-botocore (1.0.2)            – Use tornado’s AsyncHTTPClient inside botocore.
pyboto3 (1.3)                       – Pythonic Interface for AWS boto3 that gives you autocomplete on every service
whistletips (0.0.1)                 – AWS/boto3 helper library and reference tools
boto_addins (0.2)                   – Async proxy libraries for AWS services.
botocorev063p (0.63.2)              – Low-level, data-driven core of boto 3.
moto (0.4.30)                       – A library that allows your python tests to easily mock out the boto library
boto3 (1.4.2)                       – The AWS SDK for Python
  INSTALLED: 1.4.2 (latest)
txboto (0.1.0)                      – AWS implementation for Twisted, based on Boto
django-simple-s3storage (0.1)       – A simple django storage backend for Amazon S3 built ontop of Boto.
boto3_policygen (0.2)               – Generates policy documents from calls to boto3 / botocore
awscatalyst (0.0.9)                 – boto3 wrapper to make AWS DevOps’ life easier
yieldfrom.botocore (0.1.7)          – asyncio port of botocore, the low-level, data-driven core of boto 3.
django-boto (0.3.9)                 – Wrapper of boto package for django
wolphin (1.0)                       – Wolphin is a cousin of Boto. It can manage Amazon ec2 instances for your project.
django-s3-folder-storage (0.5)      – Quick extension of django-storages’ S3BotoStorage to allow separate folders for uploaded and static media within an S3 bucket.
s3stash (1.2.1)                     – Very simple module that uses boto3 to stash a file in S3
gcs-oauth2-boto-plugin (1.14)       – Auth plugin allowing use the use of OAuth 2.0 credentials for Google Cloud Storage in the Boto library.
botogram (0.3.4)                    – A Python framework for Telegram bots
botocore (1.4.85)                   – Low-level, data-driven core of boto 3.
ec2util (0.1.5)                     – Performs common ec2 tasks on the command line. Written in Python, based on boto.
bynamodb (0.1.7)                    – High-Level DynamoDB Interface for Pythonwrapping Low-Level Interface of boto
pyramid_boto3 (0.1)                 – Adapt boto3 to pyramid
aiobotocore-mirror (0.0.4)          – UNKNOWN
bcdoc (0.16.0)                      – ReST document generation tools for botocore.
gcs-oauth2-boto-plugin-grow (1.14)  – Auth plugin allowing use the use of OAuth 2.0 credentials for Google Cloud Storage in the Boto library.
django-amazon-ses (0.1.3)           – A Django email backend that uses Boto3 to interact withAmazon Simple Email Service (SES).
bespin (0.5.9.2)                    – Opinionated wrapper around boto that reads yaml
boto3helper (0.1.4)                 – boto3 helper classes
boto-mangrove (0.0.1)               – An amazon aws services connexion pool on top of boto python library
s3-encryption (0.1.3)               – Thin wrapper around boto3 S3 client which supports client side encryption compatable with ruby aws-sdk-core
botornot (0.3)                      – Check Twitter accounts for bot behavior
moto-ext (0.4.26)                   – A library that allows your python tests to easily mock out the boto library
aiobotocore (0.0.6)                 –
troposphere_sugar (0.0.5)           – Common utilities on top of troposphere and boto for ease of clouformation template creation
boto3facade (0.4.7)                 – A simple facade for Boto3
krux-boto (0.0.4)                   – Library for interacting with boto built on krux-stdlib
motoboto (0.0.0)                    – A plugin replacement for the s3 part of boto
easyboto (0.2.1)                    – Amazon Cloud made easy
botornado (0.0.4)                   – boto on tornado – an asynchronous Amazon Web Service (AWS) client
Flask-BotoSQS (0.2.0)               – Boto3 SQS integration for Flask
zone53 (0.3.3)                      – A convenient Python API to manage AWS route53 (requires boto)
ssan (0.0.1)                        – ssan is a simple boto3 S3 wrapper that provide very basic put, get, delete conventional method
zc.botokeyring (0.1.0)              – Integration of boto and keyring
boto-patch (2.38.0)                 – Amazon Web Services Library
XStatic-roboto-fontface (0.5.0.0)   – roboto-fontface 0.5.0 (XStatic packaging standard)
boto3_retry (0.1.2)                 – A tool for easily retring failed AWS requests via boto3 based on the error code
boto-scripts (0.0.0)                – Does something foo
pymangrove (1.0.0)                  – a boto connexion pool
gae_boto (13.10.1)                  – A recreation of Amazon Boto library that is is compatible with Google App Engine and easier to use.
awsmanager (0.3.6)                  – Simple boto wrapper script
Flask-Boto3 (0.2.2)                 – Flask extension that ties boto3 to the application
botocore_paste (0.2)                – Adapt botocore to paste
awslib (0.6)                        – Small library providing Amazon Web Services utility functions on top of boto
botox (0.1.1)                       – High level Boto (AWS) wrapper. Gives boto a facelift!
merkle-tree (0.2)                   – CLI to calculate Merkle Tree based on botocore implementation.
awstestutils (1.0.0)                – Artifacts to test dependencies with AWS using boto3
iboto (0.20.2)                      – Amazon EC2 shell for managing multiple accounts and regions easily
gcs-oauth2-boto-env-plugin (0.1.3)  – Google Storage auth2 plugin with support for passing service key via environment
placebo (0.8.1)                     – Make boto3 calls that look real but have no effect
kotocore (0.1.2)                    – Utility for botocore.
boto-s3-shim (0.1.1)                – Inject an alternative S3 server into any boto-based project
boto (2.44.0)                       – Amazon Web Services Library
botools (0.0.1)                     – Utilities to automate common AWS tasks, like uploading to S3
django-djaboto (0.0.6a3)            – A Django app and assorted tools to help create, deploy and manage Django projects on AWS servers
botoweb (1.5.5)                     – Boto based webapp framework
dynamo_db_dict (0.2.4)              – Simple Python interface to Amazon DynamoDB, adding some dict-like sugar to boto.dynamodb.layer2.
robotonotebook (0.0.1.post3)        – A Mezzanine CMS theme intended for publishing a personal blog with a minimalist design typeset with the Roboto typeface.
pysqes (0.2.1)                      – A simple queue service using Amazon SQS and boto
btx (0.1)                           – A botocore helper class
botool (0.1.1)                      – A botocore helper lib
boto3_paste (0.1)                   – Adapt boto3 to paste
botocore-tornado (0.93.1)           – botocore subclasses that uses AsyncHTTPClient
boto_rsync (0.8.1)                  – An rsync-like wrapper for boto’s S3 and Google Storage interfaces.
boto_utils (0.3)                    – Command-line tools based on Boto
floto (0.0.1)                       – Workflow orchestration using AWS Simple Workflow and boto3
s3rap (0.6)                         – AWS S3 convenience functions based on boto3.
botor (0.0.1dev8)                   – A thin wrapper around boto3
botodeploy (0.0.2)                  – AWS Deployment Tools
botoflow (0.8)                      – Botoflow is an asynchronous framework for Amazon SWF that helps you build SWF applications using Python
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the ‘pip install –upgrade pip’ command.

去试试:

(RunningFast) ➜  staging pip install –upgrade pip
Collecting pip
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 169kB/s
Installing collected packages: pip
  Found existing installation: pip 8.1.2
    Uninstalling pip-8.1.2:
      Successfully uninstalled pip-8.1.2
Successfully installed pip-9.0.1
(RunningFast) ➜  staging pip –version
pip 9.0.1 from /root/Envs/RunningFast/lib/python2.7/site-packages (python 2.7)
(RunningFast) ➜  staging pip install boto3
Requirement already satisfied: boto3 in /root/Envs/RunningFast/lib/python2.7/site-packages/boto3-1.4.2-py2.7.egg
Collecting botocore<1.5.0,>=1.4.1 (from boto3)
  Downloading botocore-1.4.85-py2.py3-none-any.whl (3.1MB)
    100% |████████████████████████████████| 3.1MB 254kB/s
Collecting jmespath<1.0.0,>=0.7.1 (from boto3)
  Downloading jmespath-0.9.0-py2.py3-none-any.whl
Requirement already satisfied: s3transfer<0.2.0,>=0.1.0 in /root/Envs/RunningFast/lib/python2.7/site-packages/s3transfer-0.1.9-py2.7.egg (from boto3)
Collecting docutils>=0.10 (from botocore<1.5.0,>=1.4.1->boto3)
  Downloading docutils-0.13.1-py2-none-any.whl (537kB)
    100% |████████████████████████████████| 542kB 237kB/s
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /root/Envs/RunningFast/lib/python2.7/site-packages (from botocore<1.5.0,>=1.4.1->boto3)
Collecting futures<4.0.0,>=2.2.0 (from s3transfer<0.2.0,>=0.1.0->boto3)
  Downloading futures-3.0.5-py2-none-any.whl
Requirement already satisfied: six>=1.5 in /root/Envs/RunningFast/lib/python2.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.5.0,>=1.4.1->boto3)
Installing collected packages: jmespath, docutils, botocore, futures
Successfully installed botocore-1.4.85 docutils-0.13.1 futures-3.0.5 jmespath-0.9.0

安装了boto3,以及依赖的库:

botocore-1.4.85 docutils-0.13.1 futures-3.0.5 jmespath-0.9.0

【总结】

之前用pip install boto3,出错:

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f30c47e8710>: Failed to establish a new connection: [Errno -2] Name or service not known’,)’: /simple/boto3/

确定是:

当时,(服务器是)阿里云,连接到pip的官网的网络有问题,导致连不上

解决办法:

后来换了个时间,第二天早上,网络正常了,再去pip install boto3,就可以了。

转载请注明:在路上 » 【已解决】pip install失败:Failed to establish a new connection Errno -2 Name or service not known

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. 大哥,,看了一大堆后面居然是换个时间。。 🙁
    Angor1个月前 (09-12)回复
68 queries in 0.243 seconds, using 18.94MB memory