ERROR: Exception:
Traceback (most recent call last):
File "C:\anaconda3\envs\my_py1\Lib\site-packages\pip\_vendor\urllib3\response.py", line 438, in _error_catcher
yield
File "C:\anaconda3\envs\my_py1\Lib\site-packages\pip\_vendor\urllib3\response.py", line 561, in read
data = self._fp_read(amt) if not fp_closed else b""p
-------------------------------
pip出现上述错误的时候换源,或者删除.condarc文件。
>pip install BeautifulSoup4
pip下载某些包的时候,显示
TimeoutError: The read operation timed out
During handling of the above exception, another exception occurred:
证明外国源网络不好,
换成国内:
http://pypi.douban.com/ 豆瓣
http://pypi.hustunique.com/ 华中理工大学
http://pypi.sdutlinux.org/ 山东理工大学
http://pypi.mirrors.ustc.edu.cn/ 中国科学技术大学
博主用的是Windows10:
在%HOMEPATH%(举个例子C:\User\Administrator\)下新建一个文件夹叫pip,然后新建pip.ini文件
pip.ini文件内容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
(清)
————————————————
例如:
c 用户-008(用户名)
C:\Users\008 下创建pip.ini,用记事本打开
输入一下代码,换源就可以了
[global]
index-url = http://pypi.douban.com
我用下面成功
[global]
index-url = http://pypi.hustunique.com/