spyder

How to start two instances of Spyder with Python 2.7 & Python 3.4?

人走茶凉 提交于 2019-12-06 21:57:55
问题 I had spyder installed with Python 3.4 on Windows Vista. Today I wanted to run spyder with Python 2.7. So, went through this post & installed Python 2.7 for spyder. Now, how do I start spyder with Python 2.7 instead of the default 3.4? ( I wanted to comment at the post & ask @user3058525 but could not due to reputation restriction ) Could anyone help out? P.S: I could create a virtualenv. But want to work in spyder... 回答1: @Roberto: Gotcha! Learnt that we can check for environments installed

What is Outline Explorer in Spyder?

拟墨画扇 提交于 2019-12-06 16:55:53
I see it referenced, but never explained what it is. https://docs.spyder-ide.org/editor.html Googled without success. https://docs.spyder-ide.org/editor.html "Providing a description to the right of the separator will give that cell its own name in the Outline Explorer." Sounds like something for Navigating cells? Where do I find it? Are there shortcuts for navigating cells you create? Thanks! in your code you can use this , for examle in spyder before each function ( above line of each function ) write #%% you will see the difference in gui where you will find that block is within a cell/ or

在Ubuntu的环境下,使用Spyder+TensorFlow搭建深度学习环境

ε祈祈猫儿з 提交于 2019-12-06 13:40:31
打算使用卷积神经网络对实验图片进行分类,因此需要牵涉相关的深度学习的东西。一个是之前博客谈到的Ubuntu的安装问题,这次遇到的是IDE环境的搭建。不过问题还不是很多,现在记录下来当做备注记忆吧。 主要参考的这一篇文章: 点击打开链接 ,这篇文章主要介绍了Anaconda科学计算环境的搭建,以及TensorFlow深度学习框架的搭建和Spyder的安装。讲讲我为什么要选择Spyder吧,在网上做了不少调研,大家推荐了不少IDE。主推的有Pycharm,vim,sypder等等。但是Spyder一个可视化的优点,吸引到我了。因为科研工作者用matlab比较多,比较喜欢它的可视化效果,对matlab用的也习惯。因此选择Spyder。先用着吧。 来源: CSDN 作者: fmbao 链接: https://blog.csdn.net/u011268787/article/details/77922047

Why can I call a function before defining it, with only a warning?

心已入冬 提交于 2019-12-06 11:23:44
In other languages I often do something like this: someFunc() someFunc() { // This is my function } This way I can stack all my functions lower in the file, but make the function calls at the top. Now I have a nice overview of everything that's happening. However, when I did this in Python 3 in Spyder, I got the warning that Undefined name: 'myfunc' my_func("Some string") def my_func(some_var): print(some_var) The code works fine, but I'm not sure what best practice here. Are there any negative impacts caused by my method? Or is it merely a guideline to have your functions before you call them

How to view class objects in Spyder's variable explorer

会有一股神秘感。 提交于 2019-12-06 09:51:53
This is a repeat of this question. It seems that I can't view instances of my classes in the variable explorer in Python, when I'm debugging. There the answer claims that this is resolved, so I'm wondering what I'm doing wrong. ( Spyder maintainer here ) By default we show builtins (ints, floats, strings, list, dicts and tuples), Numpy arrays and Dataframes in our Variable Explorer. If you want to see all objects present in your namespace, you need to go to the menu Tools > Preferences > Variable Explorer and turn off the option called Exclude unsupported data types 来源: https://stackoverflow

Spyder + Python 3.5 - how to debug kernel died, restarting?

喜夏-厌秋 提交于 2019-12-06 09:23:24
问题 I am working for the first time towards the implementation of a very simple GUI in PyQt5 , which embeds a matplotlib plot and few buttons for interaction. I do not really know how to work with classes so I'm making a lot of mistakes, i.e. even if the functionality is simple, I have to iterate a lot between small corrections and verification. For some reason I would like to debug, however, the whole process is made much, much slower by the fact that at any other try, the python kernel dies and

Spyder's Warning: “Session/line number not unique in database”

筅森魡賤 提交于 2019-12-06 08:48:35
问题 When I am programming in Spyder it happens from time to time that I get an error message like this: ERROR! Session/line number was not unique in database. History logging moved to new session I never really bothered with it, because I couldn't see any effect it had on the outcome of my code. However, just to be sure, I'd like to know what exactly it means, for which reasons this error tends to occur and whether/how I should fix it. Google wasn't a great help for that matter, but from naive

tkinter in Spyder

故事扮演 提交于 2019-12-06 07:19:41
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 (and how can I do it better)? many thanks in advance update to Spyder 3.0.1 https://pythonhosted.org

Open a function in Python Spyder, like I do with MATLAB

杀马特。学长 韩版系。学妹 提交于 2019-12-06 06:22:14
问题 In MATLAB, there I can place the cursor on a function name and press Ctrl + D , the file containing the function will automatically open. Is there any way I can do something similar with Python, within the Spyder IDE? 回答1: In Spyder you can jump to the definition of a function (or class) by holding CTRL and clicking on the function (or class) name/reference. If that definition is in an other file, that file will be opened. Ctrl + Leftclick EDIT as commented by @pwagner Rightclick -> Goto

Spyder - python - install external packages

半世苍凉 提交于 2019-12-06 05:41:14
问题 I have just started to use python (within Windows, 64bit) - and I have a basic question on how to install external packages within the anaconda / spyder environment. I understand that for most packages one can simply use “conda install bunnies”. However, certain packages are not in the anaconda repository, and might have be installed externally (e.g. from github). For those packages, in order to have spyder to recognize this package – does one only in addition have to update the PYTHONPATH