These are chat archives for spyder-ide/public

29th
Oct 2018
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 08:39
Hello guys, for some reason spyder does not load on Windows. I type spyder3 in the terminal but nothing happens with no error messages!
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 08:44

I type spyder3 in the terminal but nothing happens with no error messages!

Unless you installed Spyder using pip, which is for experts only, the correct command under Anaconda is spyder from the Anaconda prompt, or just using the start menu shortcut (type "Spyder") or from Anaconda Navigator. Alternatively, if you did, perhaps single instance mode is enabled (the default) and you have a Spyder process still running somewhere—if that's the case, try starting it with the --new-instance flag.

Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 08:45
I have indeed installed via pip. Anaconda doesn't work properly on my machine for some reaon . what should I do then? how can I diagnose the problem?
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 08:46
Did you try what I just asked (--new-instance)? Have you ever launched Spyder before in that environment?
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 08:47
@CAM-Gerlach Just tried that. no difference. also --reset didn't help
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 08:48
Again, have you ever launched that pip install succesfully?
Or did you just install it now?
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 08:49
yes, just a couple of miniutes ago. I restarted the computer and doesn't work now.
ok. I think I solved the problem. I ran pip install spyder -U it changed something with pyQT and it runs now. I did not test it after restart though yet.
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 08:51
It worked under Anaconda correct? If you problem as liked in that SO question was specifically with running conda, then of course Spyder should still work. If not, then your Anaconda install is likely broken and you should do a full clean reinstall of Anaconda. You can also try 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.
Okay, great. Please be aware that pip installs are not recommended for most users, since they are much more likely to break things (as you've likely noticed) and so we generally aren't able to provide individual post-install support for user-specific problems, although you're welcome to try to fix them on your own.
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 08:55
@CAM-Gerlach I gave up with conda long since that issue and honestly pip works just fine (most of the time). I'm giving a python workshop. I was thingking about using Spyder as default IDE. I'm hesitant to use conda as I haven't have a good experince myself.
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 08:58
If you feel experienced enough to deal with any pip-specific problems on your own, then sure go for it—a number of our developers roll with pip installs (although mostly on Linux, not Windows). Personally I've always favored a conda install myself; there's been a few issues here and there but nothing like what I've seen with pip, and it has a number of advantages for scientific computing.
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 09:00
@CAM-Gerlach true. the idea behind conda is great. I might give it a try. I also have some issues with the Jupyter plugin. I will ask if you don't mind.
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 09:00
I would lean against recommending to new users that they start with it though, due to many torturous issues that can arise (particularly on Windows) that can be very difficult for a newbie to resolve. But of course, its up to you, especially if you are the one supporting them :)
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 09:00
@CAM-Gerlach you mean Spyder in general or just pip-spyder?
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 09:01

I also have some issues with the Jupyter plugin. I will ask if you don't mind.

Development is currently paused and there are a number of known issues right now, but it will get rolling again after the big Spyder 4 release at the beginning of next year.

Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 09:01
@CAM-Gerlach that would be sad. :(
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 09:02

you mean Spyder in general or just pip-spyder?

pip in general for scientific computing for new users; Spyder's a great tool for newcomers as well as veterans alike and I know plenty of professors who teach it in their intro as well as higher level courses.

Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 09:03
Any idea why this is happening? pythonw_2018-10-29_10-02-58.png checked jupyter/notebook#2563 didn't help
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 09:03

that would be sad. :(

It might get restarted/worked on sooner, and we're always happy to review PRs—we're a small team that's mostly volunteers or funded by our users themselves maintaining around a dozen plugins, Spyder 3, several other packages used by a number of other projects, developing our next major release, Spyder 4, and of course helping dozens of users every day like yourself.

I assume you Googled both the error dialog and the traceback?
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 09:04
@CAM-Gerlach your support is highly appreciate of course
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 09:04
Of course, that's what I'm here for :)
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 09:05
@CAM-Gerlach indeed. edited and added the issue
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 09:05
Just asking since it seems 80-90% of users we get don't unlike yourself.
@fsfarimani_twitter By "Jupyter plugin" you do mean spyder-notebook correct? Just want to make sure I understand correctly.
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 09:07
@CAM-Gerlach true. I thought Jupyter notebook is an extension. or I'm wrong?
@CAM-Gerlach I tried the python -m ipykernel install --user which is thummed up by most of the users, but it did not help.
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 09:10
spyder-notebook is a Spyder plugin, developed by us, that integrates Jupyter notebook (developed by Project Jupyter) int o Spyder. Does this only happen wihen trying to use Jupyter notebooks in Spyder, anytime you try to launch an IPython Console kernel with spyder-notebook installed, or anytime period?
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 09:10
@CAM-Gerlach no this happens everytime I start spyder
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 09:10
Did it still reoccur when you uinstalled spyder-notebook?
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 09:55
@CAM-Gerlach sorry for the reply. I had to restart pc. I uninstall spyder-notebook. not the pop up error message is gone. but the IPython error message is still there
@CAM-Gerlach the IPython console error is gone whith pip install -U matplotlib. it seems most of the rrors just go away with a forced update/upgrade
@CAM-Gerlach now reinstalled spyder-notebook. all eroors gone!
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 10:31
Fantastic!
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 10:59
unfortunately Spyder with or without notebook causes a lot of errors 😔 despite my will I have to go forward with Jupyter notebook
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 11:09

unfortunately Spyder with or without notebook causes a lot of errors

Causes a lot of errors? I'm not sure what you mean—errors like what?

At least running many versions of Spyder 3 on several different machines and under a large number of Anaconda environments, aside from specific, edge-case bugs I've never had any critical problems (crashes, freezes, Console errors, etc) that didn't have to do with a specific version of a third party dependency, user error, something wrong with the install, or something else specific to a particular machine/environment?

despite my will I have to go forward with Jupyter notebook

?

Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 11:14
@CAM-Gerlach I just tried the notebook on a different machine and I got the same error. forcing update did not help. P.S. Now the error is back on my main pc too!
Untitled.png
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 11:20
Again, as you say this is a Jupyter notebook error, which therefore likely to do with Jupyter Notebook, spyder-notebook or your pip install, none of which we can do much about. If you're having too much trouble and can't get it working properly, we recommend you either use Anaconda (or Miniconda, if you want something much lighter to install), remove the spyder-notebook plugin for now and access any Jupyter notebooks you need to using the native Jupyter Notebook web client, and/or avoid Jupyter notebooks altogether unless you really need the specific features they provide for a the relatively narrow set of use cases for which they are the right too.
Sorry you're having trouble, and I wish there was more we can do, but some things are just out of our control.
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 11:21
@CAM-Gerlach thanks for your help. I appreciate that.
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 11:23
Sure, no problem. Hope you figure out the best solution for you!
Foad Sojoodi Farimani
@fsfarimani_twitter
Oct 29 2018 15:36
@CAM-Gerlach maybe you could be so kind to try spyder and spyder notebook installed via pip on a virtual machin? on Windows.
Kirk Evenson
@KirkECtr_twitter
Oct 29 2018 18:16
I need to install the module 'osgeo' into Spyder in Windows 10 but I'm not seeing how to do that in the help. There is a section called "Installing Python Modules" that says the command is "python -m pip <module name>" but when I try it in IPython it says that the Python package manager (pip) can only be used from outside of IPython, and that I should reissue the 'pip' command in a separate terminal or command prompt. I tried using the command in the DOS command window but it cannot locate 'python' or 'pip'.
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 18:38
Hey @KirkECtr_twitter , we have a handy guide on exactly this!
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 18:54
In brief, what's happening is the cmd.exe shell can't find the correct pip or python executable, since it isn't on your $PATH$ by default (typical with Anaconda installs). On Windows you should install packages either using the Anaconda Prompt and conda (e.g. conda install <packagename>) if you're running Anaconda (recommended), or with pip in a command line with your Spyder virtualenv/venvenvironment activated and the correct pip on your $PATH$ (for experts).
Kirk Evenson
@KirkECtr_twitter
Oct 29 2018 19:03
I browsed through the guide and it appears to provide solutions to problems that exist after installing a package. But I'm at the point where I have yet to install the module 'osgeo'. One solution I found was to use the command "!pip install <module name>" which seems to execute the 'pip' command but then can't find the module 'osgeo' and so that's my next issue to solve (in other words I got the error "No matching distribution found for osgeo")
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 19:13

I browsed through the guide and it appears to provide solutions to problems that exist after installing a package.

The guide explains how to install packages so they will be seen by Spyder; it assumes the reader knows the very basics of how to find and install packages in whatever Python environment they've installed, since this is a general Python topic and will vary depending on which Python distribution and install method (Anaconda, WinPython, Macports, Linux package manager, Git, pip, etc) they used to install Spyder in the first place. However, if read my message immediately above your reply, it explains this for the most common configurations.

One solution I found was to use the command "!pip install <module name>"

In all likelihood this may corrupt your installation, depending on how you chose to install Spyder. Please carefully follow the instructions I gave above and in the guide as to how to install packages to use with Spyder. Unless you really know what you are doing, please avoid using pip if possible since it is more difficult for non-experts to resolve the problems that often arise with it, and installing packages inside of Spyder itself is not yet currently supported. Spyder 4, which will be released in a few months, will make this process much easier, offering built-in, GUI tools to manage package and environments right within the IDE.

@KirkECtr_twitter
Kirk Evenson
@KirkECtr_twitter
Oct 29 2018 19:14
Okay, thanks. Very much appreciate the guidance.
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 19:14
Sure thing
Best of luck!
Kirk Evenson
@KirkECtr_twitter
Oct 29 2018 19:15
Anaconda was installed on my system and so far that's the only installation of Python that was done.
Well, I mean, this is how Spyder was installed by using Anaconda.
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 19:19
Great, that's what we recommend, so it should be pretty straightforward. Just fire up an Anaconda Prompt as I suggested earlier and use conda install to install your packages. If you can't find them on the defaults channel, you could try conda install -c conda-forge to pull from the community channel, but its usually best to do that in a separate environment, created using e.g. conda create -n <new-env-name> python=3 and activated using activate <new-env-name> and then run your install commands as needed. Of course, you can find all this and more if you search for the Anaconda documentation.
Anand8991
@Anand8991
Oct 29 2018 20:44
I cannot start spyder
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 20:55
@Anand8991 Okay...?
Anand8991
@Anand8991
Oct 29 2018 20:55
i gets dumped every time i open with conda
segmentation fault(code dumped)
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 20:56
Please post the full, exact error message you received.
Anand8991
@Anand8991
Oct 29 2018 20:59
anaconda3/bin/spyder
i used this command to open spyder
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 20:59
What OS are you running? Update Spyder with conda updat e spyder, and rry different versions of Qt/PyQt—conda install pyqt=5.9 or conda install pyqt=5.6. If that doesn't work, try the other suggestions in our Spyder Troubleshooting Guide, specifically the Basic First Aid and Emergency CPR sections, which resolve the great majority of Spyder installation issues.
Anand8991
@Anand8991
Oct 29 2018 21:00
then segmentation fault(core dumped)
I am using ubuntu 18
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 21:00
Please try all the suggestions above. Also please report your Spyder and anaconda (conda list anaconda) version.
Make sure you activate your Anaconda environment first, e.g. source activate base.
Anand8991
@Anand8991
Oct 29 2018 21:02
anaconda custom py36_0
anaconda-client 1.6.14 py36_0 https://repo.anaconda.com/pkgs/main
anaconda-navigator 1.8.7 py36_0 https://repo.anaconda.com/pkgs/main
anaconda-project 0.8.2 py36h44fb852_0 https://repo.anaconda.com/pkgs/main
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 21:04
Spyder version? If its not 3.3.1, most likely its due to an opengl issue that we've fixed on our end in recent versions of Spyder.
tbartholomaus
@tbartholomaus
Oct 29 2018 21:28
Hello- is it possible to run spyder3 on centos 7?
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 21:31
@tbartholomaus Sure, you should be able to install it with Anaconda (recommended unless you know what you are doing), or (for experienced Python users) with pip like any other Python package. You may also be able to grab it from your distribution's (or e.g. Fedora's if that's possible) package repository, although that version usually isn't as up to date as the official one, so we generally recommend sticking with Anaconda, or pip if you're an expert.
tbartholomaus
@tbartholomaus
Oct 29 2018 21:39
Ok, thanks. using a conda installation on a remote server, I see the splash screen for spyder when I try and open it at the terminal, but then I get the following error message:
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::SwapBehavior(DefaultSwapBehavior), swapInterval 1, profile QSurfaceFormat::OpenGLContextProfile(NoProfile))
Aborted
I'm not even sure what to make of this error message. Is it a missing video card driver? Or a python dependency? a fundamental spyder incompatibility? or something else?
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 21:43
Its the opengl error I mentioned before. As I've asked before, what's your Spyder version? Did you try updating as I mentioned? It should be fixed in the current version.
tbartholomaus
@tbartholomaus
Oct 29 2018 21:49
via conda list, I'm seeing: spyder 3.3.1 py37_1
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 21:57
Okay, that's a slightly different problem, reported as an Anaconda bug here: ContinuumIO/anaconda-issues#9142 that has to do with a problem with your graphics drivers, your GPU or with Qt. Its not a Spyder bug, so check out that issue for more details, but here are some things you can try based on that. Best of luck!
  1. conda install pyopengl
  2. conda update pyqt qt
  3. Updating your graphics card driver
  4. (if a dual-GPU setup, e.g. Intel + Nvidia) forcing one GPU or the other in your GPU's preferences.
  5. Finally conda install pyqt=5.6 if none of that works.
tbartholomaus
@tbartholomaus
Oct 29 2018 22:05
Hey! That worked! Downgrading pyqt to 5.6 was the magic bullet. Many thanks!
CAM Gerlach
@CAM-Gerlach
Oct 29 2018 22:12
Yep! Happy Spydering!