spyder

How to run Spyder with Python 3.7 with Anaconda

走远了吗. 提交于 2019-12-09 12:24:28
问题 I have installed Anaconda on a Windows 10 machine which comes with Spyder and Python 3.6 but I wish to upgrade to Python 3.7 To create an Anaconda Environment with Python 3.7 is easy by using: conda create --name py37 python=3.7 or: conda create --name py370 python=3.7.0 --channel conda-forge However starting Spyder in this environment will throw it back to Python 3.6. I tried specifing the python.exe (for version 3.7) directly in Tools -> Settings of Spyder, however upon restarting the

How to add python console in spyder

对着背影说爱祢 提交于 2019-12-09 08:35:26
问题 After upgrade spyder version 3.2.1 .I con't find the python console in spyder. It is inconvenient when i plot data interactively though the Ipython console.How can i add the python console to the spyder. 回答1: ( Spyder developer here ) The Python console was completely removed in Spyder 3.2.0 and it's not coming back. For the reasons to do that, please read this Github issue. If you want to create interactive plots in the IPython console, you need to change your graphics backend to Automatic

Spyder Python Animation not working

强颜欢笑 提交于 2019-12-09 04:27:26
I'm working on a python project using spyder from anaconda and I am trying to get the animation function working. I found a basic animation example here: http://matplotlib.org/1.4.1/examples/animation/basic_example.html and tried to make it work. However when I run it, nothing happens both in the Python and iPython console. I found this answer: Animation from matplotlib not working in spyder However, changing the preferences does not do anything and typing in %matplotlib qt returns: No module named qt4. Spyder Version: 3.1.0 Running on MacOS Sierra You need to run %matplotlib qt5 before

Cannot render_to_file in pygal more than once in Spyder

ε祈祈猫儿з 提交于 2019-12-08 18:55:31
Short version When in Spyder, if I run a script more than once that saves a map with pygal's render_to_file , I get a TypeError . It works fine the first time. Detailed version I'm trying to save a map using pygal (2.4.0) in Python 3.6 as follows: from pygal.maps.world import World worldmap = World() worldmap.add('Random Places', ['mx', 'bz', 'ru', 'th', 'et']) worldmap.render_to_file('random_places.svg') It works fine when I run from the terminal as many times as I want (I'm on Ubuntu). It also works fine when I run it the first time from Spyder (3.2), using F5. Strangely, when I then try to

Python: calculate the most and the least active customers

本秂侑毒 提交于 2019-12-08 18:37:26
I have a question on how to find the most and the least active customers. We were given a group of different names. For example "sam, sam, luke, luke, luke" We are asked to find the most frequent name and the least frequent name using python(spyder). These results need to be reflected in a box in wxFormBuilder . I am not sure what exactly I should do. Here is what I have so far for looking for the most active customer: def mostactive(self,parent): for name in range (self.m_listBox1.GetCount()): <--- the name of the box is m_listBox1 mostactivecustomer=str(self.m_listBox1.GetString(name)) self

How to load/view structure of pickled object in Ipython console ? (Windows 7, Spyder, Ipython console)

人盡茶涼 提交于 2019-12-08 11:33:36
问题 I am learning the program written by other programmer. So I would like to view the structure of the pickled item. Since I need to know the structure of pickled data, I am trying to load pickle in Ipython using Spyder... e.g.: import pickle data1 = {'a': [1, 2.0, 3, 4+6j], 'b': ('string', u'Unicode string'), 'c': None} selfref_list = [1, 2, 3] #selfref_list.append(selfref_list) output = open('data.pkl', 'wb') # Pickle dictionary using protocol 0. pickle.dump(data1, output) # Pickle the list

AttributeError: 'DiGraph' object has no attribute '_node' [duplicate]

你说的曾经没有我的故事 提交于 2019-12-08 11:17:20
问题 This question already has an answer here : networkx DiGraph Attribute Error self._succ (1 answer) Closed last year . The code is written by someone else using Python 2.7.12, networkx 1.11, numpy 1.13.0, scipy 0.18.1, matplotlib 2.0.2. It consists of several self-made modules. I have converted the entire code to Python 3.x using "2to3" converter. I am running the entire code using Spyder which has all the latest packages. Now while running the code I am getting AttributeError: 'DiGraph' object

Connect Spyder to a console in a docker container on a remote host

随声附和 提交于 2019-12-08 10:42:44
问题 I am using a docker on a remote AWS EC2 instance to run my code. My current workflow is to edit code on a local machine, push it to git and then log into the EC2 machine and the docker container in it, to pull the code and run it. I was wondering if I could somehow attach Spyder's console to the kernel inside the docker, in the EC2 instance. So my sequence of log-ins are: localhost~: ssh -XYA remote-ec2.domain.ext remote-ec2~: ssh -XYA root@localhost -p 2222 (docker)~: python runme.py I found

Update Biopython in Ipython shell

限于喜欢 提交于 2019-12-08 09:29:00
问题 python newbie here, today I updated biopython to v1.70. I use spyder/IPython shell for most of my work. if it makes any sense, the version of biopython seems updated in the python console (spyder), and windows command terminal python installation, but IPython console is still showing older version. Should that be updated separately, and if yes, how. Thanks for answers. 回答1: For Anaconda on Windows, using the Command Prompt (what you get when typing cmd or clicking on Command Prompt in the

TKinter (filedialog.askdirectory) freezing Spyder console

时光怂恿深爱的人放手 提交于 2019-12-08 06:58:46
问题 I noticed in other questions that there are (or were) several problems with TKinter in Spyder. I have been using it in IDLE for a while but I am moving to Spyder, and came upon some problems. I am running Python 3.6.4 with Spyder 3.2.8 from Anaconda 1.8.4, on Windows 7 Enterprise. When I try to use some TKinter functions (like filedialog.askdirectory ) Spyder´s console freeze. I´ve been reading different forums but still no one has the same problem or a solution to this problem. Here is a