These are chat archives for spyder-ide/public

3rd
May 2019
BezukhovA
@BezukhovA
May 03 06:12
trying to install Spyder under Anaconda on my desktop with Win10. However, failed many times. At first with vstudio which asked for internet connection thought it had never been broken off. Later a latest version of Anaconda was trialed but navigator still cannot be installed and the prompt installed does not recognize conda command. Through installing the miniconda, the navigator can be installed but the spyder therein installed does not run. Tried many solutions from googling but with no avail. Would be great if someone can help to find a proper way to install it.
CAM Gerlach
@CAM-Gerlach
May 03 08:41

At first with vstudio which asked for internet connection thought it had never been broken off.

@BezukhovA I have no idea what Spyder has to do with (I assume MS Visual) Studio?

navigator still cannot be installed and the prompt installed does not recognize conda command.

Spyder in no way needs Navigator to run; at least on Windows, by far the fastest and best way to launch Spyder is via the native Start menu shortcut, and secondarily the Anaconda prompt. I never use Navigator myself; Spyder is going to incorporate many of the same GUI features inside the IDE anyway. You mean conda does not work in Anaconda prompt?

In any case, issues installing Anaconda itself rather than specific to Spyder should be directed to them, as we have no direct control over what they do, sorry.

Through installing the miniconda, the navigator can be installed but the spyder therein installed does not run.

Again, there's absolutely 100% no need to install Anaconda Navigator and all its attendant bugs and issues just to install Spyder; you merely need to run conda install spyder in the Anaconda prompt.

spyder therein installed does not run

Like I told the last person above, you're going to have to give us a lot information in order for us to provide any useful help:

  • What is your operating system and Python version?
  • How are you trying to launch it (shortcut, Navigator, command line)?
  • What precise behavior occurs when you try to launch it? If any error messages appear, paste the exact text here.
  • Have you tried the steps in our official Spyder Troubleshooting Guide, specifically the Basic First Aid and Emergency CPR sections, which resolve the great majority of Spyder installation issues?
pgr123
@pgr123
May 03 13:58
Good morning,
I tried to update spyder 3.3.3 to 3.3.4 for python 2.7 with pip install --upgrade spyder but I got an error :Could not find a version that satisfies the requirement pyqtwebengine<5.13 (from spyder) (from versions: )
No matching distribution found for pyqtwebengine<5.13 (from spyder). Can you help me ? Thank you.
I use Ubuntu MATE 18.04 64 bits with Python 2.7.15rc1
CAM Gerlach
@CAM-Gerlach
May 03 15:02

pip install --upgrade spyder

@pgr123 Assuming you originally installed it via pip, the cause is due to Spyder requiring PyQtWebEngine for compatibility with PyQt 5.12, and since we can't specific conditional requirements with pip, and PyQtWebEngine is only available for Python >=3.5, it refuses to install (even though it should be able to, assume you're using PyQt < 5.11). The best solution is to simply upgrade to Python 3 (preferably Python 3.6 or 3.7, although Spyder also still supports Python 3.5), since there are many Unicode bugs that occur only on Python 2 and it is rapidly approaching its end of life ~6 months from now on Jan 1, with almost every major package in the scientific Python stack, including us, pledged to drop support on or before that date (or they've already done so). Other than that, I'll bring it up with the other devs. You could also install it with pip install -U --no-deps spyder spyder spyder-kernels qtconsole qtpy to upgrade all our main packages but ignore other dependencies like PyQtWebEngine, which should work. I'll bring it up with the dev team for the future.

pgr123
@pgr123
May 03 15:58
Thank you very much for your answer.
CAM Gerlach
@CAM-Gerlach
May 03 15:58
This should be fixed in Spyder 3.3.5, BTW.
pgr123
@pgr123
May 03 16:02
Perfect, I'll wait. I use also Spyder3 with Python 3.6 but some of my old code need to be modified to run (for example, the print order has changer : print 'abc' in Python 2.7 and print('abc') in Python 3) and I have a lot of old codes so it will be a big work to change all of them. Thank you. Have a good day.
CAM Gerlach
@CAM-Gerlach
May 03 17:12

I use also Spyder3 with Python 3.6

@pgr123 You can just run use your Python 3 Spyder install to run consoles in Python 2 envs; its supported (and generally recommended that you only keep one Spyder install that you use with different environments), and I can confirm it works. The one downside is that some extra features in Spyder, like code analysis, assume you're using Python 3 syntax, but there shouldn't be major issues just editing and running your legacy code. In your Python 3 Spyder (>3.3.0), you just need to change your selected interpreter under Preferences > Python interpreter > Use the following Python interpreter and any new consoles you open will open in that environment, so you can have many different consoles (even some Py2 and some Py3) in as many different envs as you want open simultaneously.

the print order has changer : print 'abc' in Python 2.7 and print('abc') in Python 3

The "order" is no different; its just that print() is just a function. However, this was implemented and officially recommended over the legacy print builtin as early as Python 2.6, released well over a decade ago, and is what you should be using regardless of your Python version. In any case, this is trivial to fix with across your codebase with futurize or other such tools; even a simple regex would get you 99% there.

I have a lot of old codes so it will be a big work to change all of them

There are excellent, comprehensive and easy to use automated tools out there (most notably python-future) that will automatically translate your code into a modern syntax that will work unmodified on both Python 2 and Python 3. You will need to do so soon anyway, so better to start enjoying the benefits of Python