ipython

VS Code运行Jupyter报错

孤者浪人 提交于 2020-09-25 11:00:21
问题描述: 今天在电脑中安装了Python3.8.5环境,然后使用pip安装了ipython和jupyter,没想到在VS Code中使用Jupyter Notebook一直有问题,一直报一个错误:“Unable to start session for kernel Python 3.8.5 64-bit . Select another kernel to launch with.” 同时VS Code中Jupyter Server的状态也一直是busy 原因分析: 一开始百思不得其解,直接运行jupyter notebook是正常的,后来在github的vscode python插件讨论区找到了答案。 原地址如下: https://github.com/microsoft/vscode-python/issues/13701 这里在自己的博客中也记录下,是因为traitlets 这个包升级的原因,traitlets 在2020.9.1升级到了5.0版本,可以在 https://pypi.org/project/traitlets/#history 查看traitlets的版本: 解决方案: 根据github中大佬们的指引,将traitlets这个包的版本降回到4.3.3解决 python3 -m pip install traitlets==4.3.3 --force

Jupyter Notebook error [duplicate]

天涯浪子 提交于 2020-08-24 05:33:09
问题 This question already has answers here : Error when executing `jupyter notebook` (No such file or directory) (12 answers) Closed last year . I am not able to run the notebook in my browser. It does not appear. The console is giving me the following error. I have Anaconda installed. Any help would be highly appreciated. Thanks C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\Cython\Distutils\old_build_ext.py:30: UserWarning: Cython.Distutils.old_build_ext does not properly handle

cv2.imshow() crashes on Mac

不打扰是莪最后的温柔 提交于 2020-08-22 11:47:29
问题 When I am running this piece of code on ipython (MacOS /python 2.7.13) cv2.startWindowThread() cv2.imshow('img', img) cv2.waitKey() cv2.destroyAllWindows() the kernel crashes. When the image appears, the only button that I can press is minimise (the one in the middle and when I press any key then the spinning wheel shows up and the only thing I can do is force quit. P.S. I have downloaded the latest python version through home-brew . 回答1: Do you just want to look at the image? I'm not sure

百度架构师深度学习课程 00 预习

允我心安 提交于 2020-08-20 08:56:41
一、作业一: ** 飞代码运行成功截图 ** ####请在下面cell中上传飞桨安装成功的截图#### 安装教程可参考:https://www.paddlepad dle.org.cn/documentation/docs/zh/install/index_cn.htm 1.查看python版本 python - - version 2.检查 Python 对应的 pip 的版本,确认是 9.0.1+ python - m ensurepip python - m pip - - version 3.执行命令安装 python - m pip install paddlepaddle - i https : // mirror . baidu . com / pypi / simple #或 python - m pip install paddlepaddle - i https : // pypi . tuna . tsinghua . edu . cn / simple 4.验证 再ipython中输入 import paddle.fluid ,再输入 paddle.fluid.install_check.run_check() 。 如果出现 Your Paddle Fluid is installed successfully! ,说明您已成功安装。 5.上传截图 启动AI

python模块

女生的网名这么多〃 提交于 2020-08-20 00:30:41
https://study.163.com/course/courseMain.htm?courseId=1006383008&share=2&shareId=400000000398149 (博主录制) (原创声明,转载引用需要指明来源) 模块概述 Python 模块(Module),是一个文件,用 .py 结尾。模块包含了 Python 对象定义和Python语句。模块能够有逻辑地组织 Python 代码段,把相关的代码分配到一个模块里能让开发人员的代码更好用,更易懂。模块能定义函数,类和变量,模块里也能包含可执行的代码。 下例是个简单的模块 simpleModule.py: # -*- coding: utf-8 -*- """ 最简单的模块 """ def PrintName(name): #定义一个函数 print("hello:",name)#输出信息 导入模块三种形式 只有导入模块后才能使用。导入有多种方法,每种方法对名称空间都有不同的影响。 模块引入形式主要有三种形式,用math模块为例,分别如下: (1) import math ( 推荐) 这是进行导入的最简单方法,通常建议这样做。您可以使用模块名称作为前缀来访问模块的名称空间。这意味着您可以在程序中使用与模块中相同的名称,但可以同时使用它们。当您导入多个模块时,就可以清晰辨别特定名称属于哪个模块。 import

Display() in Python

心已入冬 提交于 2020-08-19 02:54:42
问题 I'm trying to get my data head to display but I get an error message: NameError: name 'display' undefined import pandas as pd data = pd.DataFrame(data=[tweet.text for tweet in tweets], columns=['Tweets']) display(data.head(10)) Any ideas on how to fix this? 回答1: display is a function in the IPython.display module that runs the appropriate dunder method to get the appropriate data to ... display. If you really want to run it from IPython.display import display import pandas as pd data = pd