you may need to restart the kernel to use updated packages
当在jupyter中用pip install 命令无法安装第三方库并且出现如下问题时并出现如下问题:
可以尝试以下几种方法(在网上找了一些帖子,发现对我来说不能根本解决问题,误打误撞解决了,但不太明白原因)
; 一、完全关闭Jupyter
- 把jupyter的网页、后台、 全部关闭,如果你用的是Anaconda 那么把anaconda这个后台也退出。
- 完全退出后 重新进入jupyter 网页
- 用 pip install 库名 安装。
二、cmd 命令
- win+R 输入cmd 进入终端
- 命令行切换到你使用的jupyter本身的python库的目录下
(切换盘 D: 、进入子目录: cd 文件夹名 ) - 使用pip install 库名 安装
三、用pycharm
这是我尝试了其他方法都没用后的结果,特别麻烦,但是没想到能安装上。
- 进入pycharm
- project 项目名–>Python Interpreter
- show all
- 切换到你要用jupyter的python
- “+” –> 搜索库名–> install
; 四、换个网络
如果错误的最下方出现
内联代码片
。
//pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
可以尝试换个网络,也许下载太慢
Original: https://blog.csdn.net/weixin_49049930/article/details/124742093
Author: 路灯下的小飞侠
Title: 【you may need to restart the kernel to use updated packages】
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/729121/
转载文章受原作者版权保护。转载请注明原作者出处!