spyder

Spyder 常用快捷键总汇

无人久伴 提交于 2020-01-16 12:37:37
1、 Spyder是anaconda中一个python的集成开发环境,其优点是模仿Matlab环境,可以方便的查看和修改数组取值。不得不说anaconda是一个好东西,学python的可以用用,里面集成了好多开发环境,省去了我们安装软件等各种问题。只需你安心的学习相关技术即可。这一章节主要是对anaconda中的Spyder所常用的快捷键做一总汇:   F5:运行   F11:全屏   Ctrl + 1: 注释/反注释   Ctrl + 4/5: 块注释/块反注释   Ctrl + L: 跳转到行号   Tab/Shift + Tab: 代码缩进/反缩进   Ctrl +I:显示帮助   Tab:空行前是代码缩进;在输入一个字母后,按Tab健会自动补全或者代码提示。   Shift+Tab:撤销代码缩进 2. 可以在Ipython Console输入变量进行快速验证,类似matlab 3.快捷键查看方法:Tools-->Preferences-->Keyboard Shortcut 可以查看所有快捷键    4.spyder如何调节注释颜色:——》在tools菜单里面Preferences菜单里 来源: https://www.cnblogs.com/cjtds/p/12200534.html

在jupyter notebook和spyder切换python环境

谁说胖子不能爱 提交于 2020-01-16 01:55:06
有时需要在不同环境下运行jupyter notebook和spyder,如何在这两个编译器里切换python环境呢? 1. jupyter notebook切换python环境 这里以切换torch环境为例。 1.1 安装nb_conda 首先确认一下你的notebook里是否有conda这一个版块: 没有的话需要进行安装: 进入conda prompt,输入: conda install nb_conda 1.2 切换环境 安装完毕后重启Jupyter notebook就可以看到,进入该标题下: pytorch这个环境还没有对勾,就说明还不能切换到这个环境,在左下方搜索ipykernel包,进行安装 再重启jupyter notebook后,右上角新建中就可以选择我创建的pytorch环境了: 2. jupyter notebook切换python环境 首先在conda prompt中进入要切换的环境: 之后输入: conda install spyder spyder 就可以了 来源: CSDN 作者: YaqiYuki 链接: https://blog.csdn.net/weixin_43326692/article/details/103985350

How to use arcpy module in Anaconda's install of Spyder?

北城以北 提交于 2020-01-15 12:14:07
问题 I recently installed Anaconda's Python distribution, which includes Spyder IDE. I am interested in importing the ArcGIS 10.3 arcpy module in Spyder. Unfortunately, running import arcpy results in the following error: import arcpy Traceback (most recent call last): File "<ipython-input-2-50d283eebbb3>", line 1, in <module> import arcpy File "C:\Program Files (x86)\ArcGIS\Desktop10.3\arcpy\arcpy\__init__.py", line 21, in <module> from arcpy.geoprocessing import gp File "C:\Program Files (x86)

Spyder does not show lists and arrays in variable explorer

拜拜、爱过 提交于 2020-01-15 06:50:11
问题 i don't really know why, but Spyder is not able to show lists or arrays in the variable explorer anymore. Do you have the same problem, any fixes? I have that problem on two computers. Example: CSV = [] for x in os.listdir(location): if x.split(".")[-1] =="CSV": CSV.append(location+x) CSV = np.array(CSV) Thank you very much! 回答1: Menu (Tools->Preferences->Variable Explorer) Shortcut (Ctrl+Alt+Shift+P) Disable all the filters 回答2: Just make sure "Exclude capitalized references" in "Tools-

Matplotlib timedelta64 index as x-axis

我的未来我决定 提交于 2020-01-14 19:07:02
问题 I want to plot a dataframe, which has a timedelta64 index with the index on the x-axis. The index looks like this: In [75]: test.index Out[75]: TimedeltaIndex([ '00:00:00', '00:00:00.020000', '00:00:00.040000', '00:00:00.060000', '00:00:00.080000', '00:00:00.100000', '00:00:00.120000', '00:00:00.140000', '00:00:00.160000', '00:00:00.180000', ... '07:29:31.660000', '07:29:31.680000', '07:29:31.700000', '07:29:31.720000', '07:29:31.740000', '07:29:31.760000', '07:29:31.780000', '07:29:31.800000

Matplotlib timedelta64 index as x-axis

吃可爱长大的小学妹 提交于 2020-01-14 19:06:46
问题 I want to plot a dataframe, which has a timedelta64 index with the index on the x-axis. The index looks like this: In [75]: test.index Out[75]: TimedeltaIndex([ '00:00:00', '00:00:00.020000', '00:00:00.040000', '00:00:00.060000', '00:00:00.080000', '00:00:00.100000', '00:00:00.120000', '00:00:00.140000', '00:00:00.160000', '00:00:00.180000', ... '07:29:31.660000', '07:29:31.680000', '07:29:31.700000', '07:29:31.720000', '07:29:31.740000', '07:29:31.760000', '07:29:31.780000', '07:29:31.800000

Matplotlib timedelta64 index as x-axis

社会主义新天地 提交于 2020-01-14 19:05:25
问题 I want to plot a dataframe, which has a timedelta64 index with the index on the x-axis. The index looks like this: In [75]: test.index Out[75]: TimedeltaIndex([ '00:00:00', '00:00:00.020000', '00:00:00.040000', '00:00:00.060000', '00:00:00.080000', '00:00:00.100000', '00:00:00.120000', '00:00:00.140000', '00:00:00.160000', '00:00:00.180000', ... '07:29:31.660000', '07:29:31.680000', '07:29:31.700000', '07:29:31.720000', '07:29:31.740000', '07:29:31.760000', '07:29:31.780000', '07:29:31.800000

ImportError: cannot import name doccer

醉酒当歌 提交于 2020-01-14 10:19:27
问题 I just installed python xy 2.7.9 on Windows 7 . I went to run some previously written code in Spyder which calls: from scipy.sparse import linalg as sla However, I get the following error: File "C:\Python27\lib\site-packages\scipy\sparse\linalg\__init__.py", line 113, in <module> from .matfuncs import * File "C:\Python27\lib\site-packages\scipy\sparse\linalg\matfuncs.py", line 20, in <module> import scipy.misc File "C:\Python27\lib\site-packages\scipy\misc\__init__.py", line 44, in <module>

tkinter in Spyder

微笑、不失礼 提交于 2020-01-13 19:26:25
问题 I am trying my first steps in tkinter . I use Spyder as IDE in Python 3.5.1 |Anaconda 4.0.0. I want to run the very simple script below but it always crashes my Spyder. In a normal shell/bash it runs though and opens the canvas. import tkinter as tkr tk = tkr.Tk() canvas = tkr.Canvas(tk, width=500, height=500) canvas.grid() tk.mainloop() Under Preferences for the Ipython Console I already tried different settings (i.e. Qt, Automatik, Tkinter) but none of it did help. What am I doing wrong

tkinter in Spyder

左心房为你撑大大i 提交于 2020-01-13 19:26:10
问题 I am trying my first steps in tkinter . I use Spyder as IDE in Python 3.5.1 |Anaconda 4.0.0. I want to run the very simple script below but it always crashes my Spyder. In a normal shell/bash it runs though and opens the canvas. import tkinter as tkr tk = tkr.Tk() canvas = tkr.Canvas(tk, width=500, height=500) canvas.grid() tk.mainloop() Under Preferences for the Ipython Console I already tried different settings (i.e. Qt, Automatik, Tkinter) but none of it did help. What am I doing wrong