栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

【you may need to restart the kernel to use updated packages】

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【you may need to restart the kernel to use updated packages】

@pip insatll 命令安装不上第三方库

you may need to restart the kernel to use updated packages

当在jupyter中用pip install 命令无法安装第三方库并且出现如下问题时并出现如下问题:

可以尝试以下几种方法(在网上找了一些帖子,发现对我来说不能根本解决问题,误打误撞解决了,但不太明白原因)

一、完全关闭Jupyter
  1. 把jupyter的网页、后台、全部关闭,如果你用的是Anaconda 那么把anaconda这个后台也退出。
  2. 完全退出后重新进入jupyter 网页
  3. 用pip install 库名 安装。
二、cmd 命令
  1. win+R 输入cmd 进入终端
  2. 命令行切换到你使用的jupyter本身的python库的目录下
    (切换盘 D: 、进入子目录: cd 文件夹名 )
  3. 使用pip install 库名 安装
三、用pycharm

这是我尝试了其他方法都没用后的结果,特别麻烦,但是没想到能安装上。

  1. 进入pycharm
  2. File --> settings
  3. project 项目名–>Python Interpreter
  4. show all
  5. 切换到你要用jupyter的python
  6. “+” --> 搜索库名–> install

四、换个网络

如果错误的最下方出现
内联代码片。

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

可以尝试换个网络,也许下载太慢

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/875985.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号