spyder

Python / Kivy App running only once

巧了我就是萌 提交于 2019-12-02 09:17:32
问题 I'm running a very simple python (3.5) script using Spyder IDE from Anaconda platform. from kivy.app import App from kivy.uix.label import Label from kivy.uix.gridlayout import GridLayout from kivy.uix.textinput import TextInput class LoginScreen(GridLayout): def __init__(self, **kwargs): super(LoginScreen,self).__init__(*kwargs) self.cols = 2 self.add_widget(Label(text='Username')) self.username = TextInput(multiline=False) self.add_widget(self.username) self.add_widget(Label(text='Password'

spyder的汉化

家住魔仙堡 提交于 2019-12-02 08:32:22
Spyder是Python一个简单的集成开发环境。原系统为英文版。Spyder汉化,使用了网络上的方法,成功汉化,给大家提供我最后成功的方案。 汉化环境: 1、window系统 2、安装好Anaconda3(直接使用发行版的python很大几率激活失败,不建议安装在系统盘,安装在其它盘目录) 2、spyder的版本要3.X以上 汉化包下载: 链接:https://pan.baidu.com/s/1BADSd_oE_oL9_BEp5iduDA 提取码:n5ur 1、把下载好的汉化包解压出来,把文件放到一个路径下面。 例如:F:/ 汉化包中的的mian.py 文件是核心文件尽量不要动 注意:python的path路径一定要配置,不然输入指令将会报错。、 注: python的path路径配置, 此电脑(我的电脑)->右键属性->高级系统设置->高级->环境变量->双击Path->新建->输入python安装路径 2、在含有main.py的文件夹中,不要选中任何文件,按Shift+右键,选择在此处打开命令窗口,输入 python main.py。 3、这里选择根据自己喜好,选择模式。 4、选择完模式后,会让你选择python类别。这里选1,Anaconda类别。选择第二个,容易出错。 5、最后一步,重启Spyder选择菜单栏中的Tools—Preferences—General

Why can't I import opencv3 even though the package is installed?

徘徊边缘 提交于 2019-12-02 06:33:03
问题 I currently am running Python 3.5 and using Spyder from Anaconda as my IDE. I am running this on a Windows machine. When I write import cv3 at the top of my code, it returns the error ImportError: No module named 'cv3' I attempted to install opencv3 again with the command conda install -c https://conda.binstar.org/menpo opencv3 in the Command Prompt. It is apparently already installed because it returned Fetching package metabase............... Solving package specifications: . # All

Code autocompletion 'partially' works in the editor pane of Spyder3

若如初见. 提交于 2019-12-02 04:55:42
I installed spyder3 through miniconda3 on my win10 PC. Autocompletion works perfectly in the Ipython console pane but not in the editor pane. In the editor pane it only list partial completion options when I use TAB or Ctrl + Space This is my Editor preferences settings which is almost default. Should Editor pane's auto completion ability be 'weaker' than that of Ipython pane in Spyder3? ( Spyder maintainer here ) It's a true and sad reality, but our Editor can't show the same completions that are available to the IPython console. I explained in this other StackOverflow answer why that's the

Remove a tuple containing nan in list of tuples — Python

∥☆過路亽.° 提交于 2019-12-02 04:29:35
I have a long list of tuples and want to remove any tuple that has a nan in it using Python. What I currently have: x = [('Recording start', 0), (nan, 4), (nan, 7), ..., ('Event marker 1', 150)] Result I'm looking for: x = [('Recording start', 0), ('Event marker 1', 150)] I've tried use np.isnan and variants of that, but have had no success and keep getting an error: ufunc 'isnan' is not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule "safe" Any suggestions would be appreciated!! You could use list comprehension

The Anaconda prompt freezes when I run code with numba's “jit” decorator

痞子三分冷 提交于 2019-12-02 04:27:23
I have this python code that should run just fine. I'm running it on Anaconda's Spyder Ipython console, or on the Anaconda terminal itself, because that is the only way I can use the "numba" library and its "jit" decorator. However, either one always "freezes" or "hangs" just about whenever I run it. There is nothing wrong with the code itself, or else I'd get an error. Sometimes, the code runs all the way through perfectly fine, sometimes it just prints the first line from the first function, and sometimes the code stops anywhere in the middle. I've tried seeing under which conditions the

PyQt app doesn't exit when i close the window

人走茶凉 提交于 2019-12-02 03:25:18
Whenever i execute the code and close the window, it closes,but the python console in the IDE doesn't return the exit code,when i try to run it again i get a warning dialog that says something like No python console is selected to run main.py So i have to close the IDE python console, and open a new one, then run the program in the new python console I'm using spyder IDE 64 bits on windows from PyQt4.QtCore import * from PyQt4.QtGui import * import sys if __name__ == "__main__": app = QApplication(sys.argv) win = QMainWindow() win.show() sys.exit(app.exec_()) If you execute the code in a

Python / Kivy App running only once

别说谁变了你拦得住时间么 提交于 2019-12-02 03:24:02
I'm running a very simple python (3.5) script using Spyder IDE from Anaconda platform. from kivy.app import App from kivy.uix.label import Label from kivy.uix.gridlayout import GridLayout from kivy.uix.textinput import TextInput class LoginScreen(GridLayout): def __init__(self, **kwargs): super(LoginScreen,self).__init__(*kwargs) self.cols = 2 self.add_widget(Label(text='Username')) self.username = TextInput(multiline=False) self.add_widget(self.username) self.add_widget(Label(text='Password')) self.password = TextInput(multiline=False, password=True) self.add_widget(self.password) class

How to connect to an existing Jupyter Notebook kernel and inspect variables using the Variable explorer?

心不动则不痛 提交于 2019-12-02 02:41:51
问题 If I've got a kernel running through a Jupyter Notebook, I can easily connect to it from Spyder using Options > Connect to an exisisting kernel > Browse . Now I can get access to the Jupyter kernel and view the dataframe or any other variable by just running df : Jupyter snippet: #imports import numpy as np import pandas as pd # Some sample data np.random.seed(1234) df = pd.DataFrame({'A1':np.random.normal(10, 1, 8), 'B1':np.random.normal(20, 2, 8)}) Spyder snippet: df # output: A1 B1 0 10

How to connect to an existing Jupyter Notebook kernel and inspect variables using the Variable explorer?

六眼飞鱼酱① 提交于 2019-12-02 00:28:17
If I've got a kernel running through a Jupyter Notebook, I can easily connect to it from Spyder using Options > Connect to an exisisting kernel > Browse . Now I can get access to the Jupyter kernel and view the dataframe or any other variable by just running df : Jupyter snippet: #imports import numpy as np import pandas as pd # Some sample data np.random.seed(1234) df = pd.DataFrame({'A1':np.random.normal(10, 1, 8), 'B1':np.random.normal(20, 2, 8)}) Spyder snippet: df # output: A1 B1 0 10.471435 20.031393 1 8.809024 15.514630 2 11.432707 22.300071 3 9.687348 21.983892 4 9.279411 21.906648 5