找回密码
 立即注册

扫一扫,访问微社区

QQ登录

只需一步,快速开始

查看: 2729|回复: 2

[求助] pip 安装包connection error

1

主题

1

帖子

1

积分

贫民

积分
1
wowo1215 发表于 2019-8-7 10:25:39 | 显示全部楼层 |阅读模式
环境: python 3.7 + Anaconda, 公司网络环境
问题:用pip安装包的时候报connection error,log如下, 但是镜像的网址(包括国内国外)都可以访问。
求各位大佬指教

#########log log log###############
C:\user1\study\python>pip install MouseInfo
Looking in indexes: http://pypi.douban.com/simple
Requirement already satisfied: MouseInfo in c:\python37\anaconda3\lib\site-packages\mouseinfo-0.0.4-py3.7.egg (0.0.4)
Requirement already satisfied: Pillow in c:\python37\anaconda3\lib\site-packages (from MouseInfo) (6.1.0)
Collecting pyperclip (from MouseInfo)
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPConnection object at 0x000002687AB7F7B8>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected ** did not properly respond after a period of time, or established connection failed because connected host has failed to respond')': /simple/pyperclip/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPConnection object at 0x000002687AB7F1D0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected ** did not properly respond after a period of time, or established connection failed because connected host has failed to respond')': /simple/pyperclip/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPConnection object at 0x000002687AB7F668>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected ** did not properly respond after a period of time, or established connection failed because connected host has failed to respond')': /simple/pyperclip/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPConnection object at 0x000002687AB7F5F8>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected ** did not properly respond after a period of time, or established connection failed because connected host has failed to respond')': /simple/pyperclip/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPConnection object at 0x000002687A32D080>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected ** did not properly respond after a period of time, or established connection failed because connected host has failed to respond')': /simple/pyperclip/
  ERROR: Could not find a version that satisfies the requirement pyperclip (from MouseInfo) (from versi**: none)
ERROR: No matching distribution found for pyperclip (from MouseInfo)

回复

使用道具 举报

0

主题

34

帖子

34

积分

贫民

积分
34
一叶落而知秋 发表于 2019-8-8 13:25:20 | 显示全部楼层
1) 在用户目录下:如C:\Users\Administrator,新建pip文件夹
2) 在pip目录下新建pip.ini文件,添加如下内容并保存:
        [global]
        index-url = https://pypi.tuna.tsinghua.edu.cn/simple
        [install]
        trusted-host = mirrors.aliyun.com

点评

正解  发表于 2019-8-8 19:59
回复 支持 1 反对 0

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表