4

pip install nbextensions插件报错:ReadTimeoutError解决方法

 3 years ago
source link: http://huanyouchen.github.io/2019/11/14/pip-install-ReadTimeoutError/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
幻悠尘的小窝

The quieter you become,the more you are able to hear.

pip install nbextensions插件报错:ReadTimeoutError解决方法

今天再给Jupyter Notebook安装jupyter-contrib-nbextensions这个插件时,使用pip install报错,一大片姨妈红,报错信息如下:

raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

把原来pip install xxx修改为pip --default-timeout=100 install xxx

#报错的安装命令:
sudo python3.5 -m pip install jupyter-contrib-nbextensions

# 顺利安装成功的命令:
sudo python3.5 -m pip --default-timeout=100 install jupyter-contrib-nbextensions

安装后提示:

launchpadlib 1.10.6 requires testresources, which is not installed.

继续pip install launchpadlib即可。

然后,执行下面命令用于安装javascript和css文件

jupyter contrib nbextension install --user

最后,再次Jupyter notebook打开即可看到nbextensions插件。

———-后续

在Nbextensions界面中,我选择了autopep8这个选项,第二天打开jupyter notebook时,又提示需要安装autopep8,于是再次pip安装。

sudo python3.5 -m pip install autopep8

顺利完成~


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK