FAQ Database Discussion Community

Setup Spyder to work with Anaconda python on Ubuntu 14.04

I installed Spyder IDE before I have installed the Anaconda (on Ubuntu 14.04), on the terminal when I type python I have the anaconda python and I can import all of its packages. But on Spyder I still have the original python and I cannot import the Anaconda packages, how...

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

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...

How can I view the progress of a program run in spyder IDE?

I want to view the progress of a program while it is running in Spyder. Is it possible? As of now, I dont seem to know when it finishes unless I write a print statement at the bottom indicating that the program finished execution

Add help to python module

I use Spyder and for example numpy. Then, when I use some function, like np.interp(), object inspector gives me help about this function. How to put documentation into my modules which will be displayed in Spyder's object inspector?

How do I debug efficiently with spyder in Python?

I like Python and I like Spyder but I find debugging with Spyder terrible! Every time I put a break point, I need to press two buttons: first the debug and then the continue button (it pauses at first line automatically) which is annoying. Moreover, rather than having the standard...

Proper style of coding __init__.py in Python modules

I'm not that fluent in Python so I'm not sure if what I'm doing is common practice or the proper way to do it. I'm creating a module archive contaning files with one class each, e.g. SmsArchiveReader.py with class SmsArchiveReader inside. To make the imports less tedious, I decided to...

how to have one file work on objects generated by another in spyder

I'm sure someone has come across this before, but it was hard thinking of how to search for it. Suppose I have a file generate_data.py and another plot_utils.py which contains a function for plotting this data. Of note, generate_data.py takes a long time to run and I would like to...

'ls' is not recognized in Anaconda Python 2.7 Spyder

I run my codes in Anaconda Spyder Python 2.7 for Windows 7 64bits. But when I run this code: !ls -lh ./training3.crfsuite I received this error: 'ls' is not recognized as an internal or external command, operable program or batch file. Does anyone know why? Thank you....

Spyder 2.3.4 + Python 3.4: IPython not available

I have just installed Spyder 2.3.4. on my Ubuntu 14.04 x64 machine. In former versions I was working with Python 2.7 and had the option to start an IPython shell on the startup. But I can't find this option in the newest version anymore. At first, I thought my question...

Python class instance not being destroyed at end of method [duplicate]

This question already has an answer here: How do I avoid having Python class data shared among instances? 6 answers I should begin by saying this is being run in IPython, using the Spyder IDE if it makes a difference. I am somewhat of a newbie at Python but...

python import shares common values?

Might sound beginner-ish, but here goes. I am importing a Typedef script which contains variables which are used and called throughout my program. I do this by simply calling 'import Typedef' on all scripts within the package/workspace. Now I change a variable in Typedef in one of the scripts by...

Compilation difference in Spyder IDE and Python intrepeter

This problem may seem a little strange, but a while (about 1-2 weeks) ago I wrote a little Python script which I tested and everything worked just fine. Today when I was taking lines from this latter script, the lines would run without any error in the Spyder IDE Python...

Uninstall Python package using pip3

I am working with Python 3.4 and have installed a package (spyder) using pip3 install. It is works as it should and I can start it from the terminal. Since I want to switch my IDE, I tried to uninstall it using pip3 uninstall in the same way as the...

Python. ValueError could not convert string to float:

I'm trying to produce the average of numbers in a specified column in a text file. I am receiving an error that python could not convert string to float, although I don't see where I could be passing it an invalid string. def avg_col(f, col, delim=None, nhr=0): """ file, int,...

virtualenv IPython in Spyder not working

I have installed Spyder on Linux (Mint 17 to be exact) and created a scientific virtualenv (sci) with ipython, numpy, etc. The idea is to vary my virtual env for python 2 / python 3 and being a bit more flexible than installing the whole of Anaconda / python(x,y). I...

Is it possible to set Spyder auto-completion without pressing the tab key?

I'm using Spyder 2.3.4 (shipped with Anaconda) on Windows. The tab completion works fine. I'm wondering is it possible to do the auto-completion without pressing tab key each time? (Sublime and Intellij could pop up auto-completion window when typing part of the function names.)...

Resolve Anaconda/iPython Notebooks/Spyder IDE launch failure on zmq lib import?

This is a fresh Anaconda 2.1 install on Windows 7 - 64, python 2.7.8 . The Spyder IDE fails to launch, and throws the same error/writes same traceback when "python spyder --reset" is run from cli. Looking at the traceback, it appears to be a problem loading 'zmq' module. That...

How to add “new line” keyboard shortcuts in spyder

When using other editors, most of them have a function about "new line". For example, the Sublime Text, use Ctrl + enter to enter new line directly whatever cursor is at end of line or not. After checked all the setting about spyder, have no idea about this. Thus i...

Does PyCharm Have Spyder's Variable Explorer Functions (mainly “Save As” and “Import”)?

I started playing around with PyCharm today, and it seems like this is the Python IDE I want to start working with in the near future. Currently, I am using Spyder from Anaconda. What I really like about Spyder is that I am able to export and import variables from...