Can't run Spyder or .py(w) scripts with Windows 10 - python-2.7

Can't open Spyder2 in Windows 10.0 (# 10240): the icon just appears briefly. Python 2.7.10 and Spyder 2.3.1 were loaded with Anaconda 2.3.0 (64-bit). The python console works fine - but I can't get my *.py or *.pyw files running. There is probably some message in the Python console when attemtping to open Spyder, but I don't know how to capture it.

First, one correction: the problem was with starting Spyder, not running .py or .pyw files. Anyway, things work all right now after de-installing Spyder and Python, and reinstalling the Python(x,y) package (instead of Anaconda's). Then, when starting Spyder from the Python(x,y)start window, it behaves normally.

Related

spyder, numpy, anaconda : cannot import name multiarray

I am on Windows 10, 64bits, use Anaconda 4 and I created an environment with python 2.7 (C:/Anaconda3/envs/python2/python.exe)
In this environment, I successfully installed numpy and when I type "python", enter, "import numpy", enter, it works perfectly in the anaconda prompt window.
In spyder however, when I open a python console and type "import numpy", I get "cannot import name multiarray". I have obviously changed the path of the python interpreter used by spyder to match the python.exe of the environment I created (C:/Anaconda3/envs/python2/python.exe). I also updated the PYTHONSTARTUP to C:/Anaconda3/envs/python2/Lib/site-packages/spyderlib/scientific_startup.py
It's supposed to be the exact same python program running but it's two different behavior. How is it possible and how to fix it ?
PS: I already tried the various solutions to this error like uninstalling numpy and reinstalling it. It shouldn't be a problem with numpy since it works just fine in the python console of the anaconda prompt window.
I solved the problem by executing the spyder version of the python2 environment.
It is located in Anaconda3\envs\python2\Scripts\spyder.exe
I have encountered same issue. I have followed every possible solution, which is stated on stack-overflow. But no luck. The cause of error might be the python console. I have installed a 3.5 Anaconda, and the default console is the python 2.7, which I have installed primarily with pydev. I did this and now it is working absolutely fine. Go to tools>preferences and click on reset to defaults. It might solve the issue. Or another solution is to uninstall the current Anaconda i.e. y.x and installing the correct one according to the default. In my case 2.7 Anaconda instead of 3.5

How to select what version of Python Spyder will open on Ubuntu 16.04?

I have been struggling with multiple versions of Python on Ubuntu 16.04. I have versions 2.7 and 3.5. I have followed the steps from the Anaconda site as to how to switch from one environment to another with "source activate snakes". That works well when just looking at the default when calling python from the terminal, but when I attempt to open spyder IDE, no matter what other version is the default, it just opens on python 2.7.
Any ideas how this can be switched in a non permanent way, since I need both versions of Python?
Thanks in advance,
Do you have spyder3? I have spyder and spyder3. Depending on which of those spyders I'm opening the default python would be 2.7 for spyder and 3.5 for spyder3. I open spyders from terminal in ubuntu. That might not be the most reasonable solution, but it works.

Spyder in WinPython can't connect to kernel

I am using a fresh install of WinPython 2.7, which includes Spyder 3.0.0, on Windows 10. When I start Spyder, the ipython console never connects to the kernel.
I have tried resetting spyder through the WinPython command prompt (spyder --reset&&spyder) and regular command line (spyder --reset) and tried opening multiple ipython consoles without any luck. There are no errors in the kernel tab. I have made sure that Spyder is pointing to the correct python.exe in WinPython. I have made sure the qtconsole is installed. Ipython QT console built into WinPython works fine.
Thank you for any help you can provide.
what is your path to winpython ? spaces or unicode characters may trouble Spyder.
Otherwise try with a previous, or posterior version of WinPython

No exe file created after installing spyder 2.2.1

Just finished installing spyder 2.2.1, but i got no .exe file. I only have .bat file. running the .bat does start spyder, but the lack of .exe makes me think the installation process went wrong somewhere.
Any help?
(Spyder dev here) No, there is no problem at all. Spyder is not built as an executable in Windows because it's based on Python too (which is an interpreted, not a compiled language).
Note: By the way, Spyder 2.1 is too old (and now unmaintained). Please refer to our downloads page to install the most recent version (which right now is 2.2.1).

Installing anaconda to use with windows

I am lost in the installation process of installing anaconda on windows.
I've installed the windows 32bit package (I'm running windows 7 x64)
I have anaconda in the start menu and I can open the python console and use scipy.stats.t.interval(), the function I am interested in.
However, how do I go about including this in another python program? I think it's something like adding it to the path. For instance, I have the scipy.stats.t.interval() function call in my other python file which I run through cygwin via python myscript.py. However it returns the error:
from scipy.stats import t
ImportError: No module named scipy.stats
I think it might be a change of path / add to path issue, but I'm not sure how to fix it :/. While I try to fix it, I figure I will post for help here.
well you might have two installations of python, one inside the anaconda package, and other which you might have installed earlier. try doing :
which python
from CygWin console.
If it returns:
/usr/bin
then it is definitely a add-to-path problem.
to fix it for CygWin,
you have to add the python installation from anaconda to the path.
try this fromn CygWin:
PATH=path-where-anaconda-is-installed/anaconda/bin:$PATH
and then doing:
which python
should give you:
/path-to-anaconda/anaconda/bin
and then it will work.
Cheers