spyder

安装spyder记录

扶醉桌前 提交于 2019-11-27 00:01:00
sudo apt-get install spyder 报错:ERROR: Could not find a version that satisfies the requirement pyqt5<5.13;... 百度了半天还是没有解决,于是看了一下 sudo apt-cache search spyder 相关的包原来不少,再尝试 sudo apt-get install spyder3 安装成功,再执行sudo apt-get install spyder也安装成功 附:pip安装使用国内源,参见 https://www.cnblogs.com/pangzhi/p/8196144.html 来源: https://www.cnblogs.com/qq812256/p/11335908.html

Plot inline or a separate window using Matplotlib in Spyder IDE

混江龙づ霸主 提交于 2019-11-26 19:45:07
问题 When I use Matplotlib to plot some graphs, it is usually fine for the default inline drawing. However, when I draw some 3D graphs, I'd like to have them in a separate window so that interactions like rotation can be enabled. Can I configure in Python code which figure to display inline and which one to display in a new window? I know that in Spyder, click Tools, Preferences, Ipython Console, Graphics and under Graphics Backend select “automatic” instead of “inline”. However, this make all the

numpy array dtype is coming as int32 by default in a windows 10 64 bit machine

為{幸葍}努か 提交于 2019-11-26 17:49:54
问题 I have installed Anaconda 3 64 bit on my laptop and written the following code in Spyder: import numpy.distutils.system_info as sysinfo import numpy as np import platform sysinfo.platform_bits platform.architecture() my_array = np.array([0,1,2,3]) my_array.dtype Output of these commands show the following: sysinfo.platform_bits Out[31]: 64 platform.architecture() Out[32]: ('64bit', 'WindowsPE') my_array = np.array([0,1,2,3]) my_array.dtype Out[33]: dtype('int32') My question is that even

How to run Spyder in virtual environment?

雨燕双飞 提交于 2019-11-26 17:09:29
I have been using Spyder installed with with Anaconda distribution which uses Python 2.7 as default. Currently I need to set up a development virtual environment with Python 3.4. Top two suggestions after research online are: to set up virtual environment first and to point change the preferences of Spyder , e.g here ; to install all Spyder dependencies, like PyQt4, in the virtual environment itself, e. g. here ; Both recommendations are cumbersome and do not look like smart options for development. Is there a solution that would allow to run Spyder with required Python version automatically

Builtin function not working with Spyder

狂风中的少年 提交于 2019-11-26 15:33:41
I'm trying to use the max function in Python 3,6: print('Maximum is:', max(1, 3, 2, 5, 4)) And the result is File "E:/ProgramyRobione/untitled1.py", line 2, in <module> print('Maximum is:', max(1, 3, 2, 5, 4)) TypeError: 'int' object is not callable I'm using Spyder and that line is all that code should do. This is a bit of an iPython headshot that comes with Spyder. I've fallen foul of this when copy/pasting random bits of code from SO to test only to find really odd behaviour several days later - variables defined in the iPython console will also be in the script's global namespace

How do I get interactive plots again in Spyder/IPython/matplotlib?

我们两清 提交于 2019-11-26 15:11:42
问题 I upgraded from Python(x,y) 2.7.2.3 to 2.7.6.0 in Windows 7 (and was happy to see that I can finally type function_name? and see the docstring in the Object Inspector again) but now the plotting doesn't work as it used to. Previously (Spyder 2.1.9, IPython 0.10.2, matplotlib 1.2.1), when I plotted this script, for instance, it would plot the subplots side-by-side in an interactive window: Now (Spyder 2.2.5, IPython 1.2.0, Matplotlib 1.3.1) when I try to plot things, it does the subplots as

PIP: “Cannot uninstall &#39;ipython&#39;. It is a distutils installed project and thus we cannot accurately determine…”

假装没事ソ 提交于 2019-11-26 10:58:32
问题 Trying to install spyder using pip : pip install spyder This error pops up: Cannot uninstall \'ipython\'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. 回答1: You can upgrade ipython without uninstall the old version sudo -H pip install --ignore-installed -U ipython 回答2: Just solved with: sudo apt-get remove ipython 回答3: For Python 2: pip install --upgrade --force-reinstall --no-cache-dir Spyder

How to update matplotlib&#39;s imshow() window interactively?

佐手、 提交于 2019-11-26 09:40:45
问题 I\'m working on some computer vision algorithm and I\'d like to show how a numpy array changes in each step. What works now is that if I have a simple imshow( array ) at the end of my code, the window displays and shows the final image. However what I\'d like to do is to update and display the imshow window as the image changes in each iteration. So for example I\'d like to do: import numpy as np import matplotlib.pyplot as plt import time array = np.zeros( (100, 100), np.uint8 ) for i in

How to change python version in anaconda spyder

走远了吗. 提交于 2019-11-26 07:37:05
问题 I am using 3.6 Python version in anaconda spyder on my mac. But I want to change it to Python 2.7. Can any one tell me how to do that? 回答1: You can open the preferences (multiple options): keyboard shortcut Ctrl + Alt + Shift + P Tools -> Preferences And depending on the Spyder version you can change the interpreter in the Python interpreter section (Spyder 3.x): or in the advanced Console section (Spyder 2.x): 回答2: If you want to keep python 3, you can follow these directions to create a

How to run Spyder in virtual environment?

ぃ、小莉子 提交于 2019-11-26 04:36:43
问题 I have been using Spyder installed with with Anaconda distribution which uses Python 2.7 as default. Currently I need to set up a development virtual environment with Python 3.4. Top two suggestions after research online are: to set up virtual environment first and to point change the preferences of Spyder , e.g here; to install all Spyder dependencies, like PyQt4, in the virtual environment itself, e. g. here ; Both recommendations are cumbersome and do not look like smart options for