Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spyder 3.0 Beta3 fails to start in OS X #3267

Closed
kcarnold opened this issue Jun 27, 2016 · 18 comments
Closed

Spyder 3.0 Beta3 fails to start in OS X #3267

kcarnold opened this issue Jun 27, 2016 · 18 comments
Milestone

Comments

@kcarnold
Copy link

This is more likely an issue with the spyder-ide conda channel, but I don't know where to report bugs there.

What steps will reproduce the problem?

  1. Install a fresh Anaconda3 (because I somehow messed up my old Anaconda install).
  2. Follow the instructions in the release announcement:
conda update qt pyqt
conda install -c spyder-ide spyder==3.0.0b3
  1. Type spyder.

What is the expected output? What do you see instead?

$ spyder
Traceback (most recent call last):
  File "/Users/kcarnold/anaconda3/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 28, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: No module named 'PyQt5.QtWebEngineWidgets'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/kcarnold/anaconda3/bin/spyder", line 3, in <module>
    start.main()
  File "/Users/kcarnold/anaconda3/lib/python3.5/site-packages/spyderlib/app/start.py", line 118, in main
    from spyderlib.app import spyder
  File "/Users/kcarnold/anaconda3/lib/python3.5/site-packages/spyderlib/app/spyder.py", line 91, in <module>
    from qtpy import QtWebEngineWidgets
  File "/Users/kcarnold/anaconda3/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 32, in <module>
    from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ImportError: dlopen(/Users/kcarnold/anaconda3/lib/python3.5/site-packages/PyQt5/QtWebKitWidgets.so, 2): Library not loaded: @rpath/./libQt5WebKitWidgets.5.dylib
  Referenced from: /Users/kcarnold/anaconda3/lib/python3.5/site-packages/PyQt5/QtWebKitWidgets.so
  Reason: image not found

Please provide any additional information below

I had been using 3.0b2 following #2724 for several months with only minor issues. But then I messed up my Anaconda install :(.
#3145 and #3198 seem to indicate that this used to be a problem and was fixed?

Versions and main components

  • Spyder Version: 3.0b3
  • Python Version: 3.5
  • Operating system: OS X 10.11.5
@ccordoba12
Copy link
Member

You need to update qtpy to its latest version with

conda update qtpy

@kcarnold
Copy link
Author

Unfortunately it already was:

$ conda update qtpy
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .........
# All requested packages already installed.
# packages in environment at /Users/kcarnold/anaconda3:
#
qtpy                      1.0.2                      py_0    spyder-ide

@ccordoba12 ccordoba12 reopened this Jun 27, 2016
@ccordoba12
Copy link
Member

What if you run

conda update qt5 pyqt5

?

@kcarnold
Copy link
Author

Same deal:

$ conda update qt5 pyqt5
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .........
# All requested packages already installed.
# packages in environment at /Users/kcarnold/anaconda3:
#
pyqt5                     5.5.0                    py35_0    spyder-ide
qt5                       5.6.0                         0    spyder-ide

@drdadr
Copy link

drdadr commented Jun 28, 2016

Same here but for Python 2.7
Switched to Spyder beta for the same reason (slow on OS X) weeks ago
Anaconda launcher stopped working today. Reinstalled anaconda, updated QT and so on. Installed Spyder beta. New anaconda Navigator app fails to start. Can't start spyder. Checked everything mentioned above. All packages are up to date.

Traceback (most recent call last):
  File "/Users/david/anaconda/bin/spyder", line 3, in <module>
    start.main()
  File "/Users/david/anaconda/lib/python2.7/site-packages/spyderlib/app/start.py", line 118, in main
    from spyderlib.app import spyder
  File "/Users/david/anaconda/lib/python2.7/site-packages/spyderlib/app/spyder.py", line 91, in <module>
    from qtpy import QtWebEngineWidgets
  File "/Users/david/anaconda/lib/python2.7/site-packages/qtpy/QtWebEngineWidgets.py", line 32, in <module>
    from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ImportError: dlopen(/Users/david/anaconda/lib/python2.7/site-packages/PyQt5/QtWebKitWidgets.so, 2): Library not loaded: @rpath/./libQt5WebKitWidgets.5.dylib
  Referenced from: /Users/david/anaconda/lib/python2.7/site-packages/PyQt5/QtWebKitWidgets.so
  Reason: image not found

Here's the report from the Navigator.app:

~/Desktop/Navigator.app/Contents/MacOS/run.sh 
This application failed to start because it could not find or load the Qt platform plugin "cocoa"
in "".

Reinstalling the application may fix this problem.
/Users/david/Desktop/Navigator.app/Contents/MacOS/run.sh: line 3: 13301 Abort trap: 6           /Users/david/anaconda/bin/anaconda-navigator $@

@ccordoba12
Copy link
Member

ccordoba12 commented Jun 28, 2016

@kcarnold, this is certainly wrong:

pyqt5                     5.5.0                    py35_0    spyder-ide
qt5                       5.6.0                         0    spyder-ide

Either pyqt5 and qt5 are at 5.5.0 or at 5.6.0, but you can't have that mix of versions.

Besides, we had to make some changes to the qt and pyqt packages, so until we release new versions of qt5 and pyqt5, you need to remove them with:

conda remove qt pyqt

@kcarnold
Copy link
Author

I have no idea how it got version 5.5 from the channel. This was literally a brand-new fresh Anaconda3 install and spyder 3 was the very first thing I tried to install.

I was able to get the right version to install by specifying the channel explicitly in the conda install command:

$ conda install pyqt5=5.6.0
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .........
Solving package specifications: .
Error: Package missing in current osx-64 channels:
  - pyqt5 5.6.0*

$ conda install -c spyder-ide pyqt5
Using Anaconda Cloud api site https://api.anaconda.org
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata ...........
Solving package specifications: ..........

Package plan for installation in environment /Users/kcarnold/anaconda3:

The following NEW packages will be INSTALLED:

    pyqt5: 5.6.0-py35_0  spyder-ide
    qt5:   5.6.0-0       spyder-ide

The following packages will be UPDATED:

    sip:   4.16.9-py35_0            --> 4.18-py35_0 spyder-ide

I haven't retried the full Anaconda install, but I can report that the following commands work:

conda create -n spyder python=3.5
source activate spyder
conda update qt pyqt # does nothing because qt/pyqt not installed
conda install -c spyder-ide spyder==3.0.0b3
spyder

So perhaps Anaconda was somehow using an out-of-date cache file (despite being a fresh install)? It sounds like there's some stray version out there somewhere, so I won't close the bug for now (your call), but the symptom is resolved for me.

@ccordoba12 ccordoba12 changed the title spyder==3.0.0b3 fails to start Beta3 fails to start Jun 28, 2016
@ccordoba12 ccordoba12 changed the title Beta3 fails to start Spyder 3.0 Beta3 fails to start Jun 28, 2016
@ccordoba12 ccordoba12 added this to the v3.0beta4 milestone Jun 29, 2016
@ccordoba12
Copy link
Member

I'm recompiling the packages provided in the spyder-ide channel to try to fix this problem.

@drdadr
Copy link

drdadr commented Jun 29, 2016

I tried the following:

conda create -n spyderBeta python=2.7
source activate spyderBeta
conda install -c spyder-ide spyder==3.0.0b3
spyder

And Spyder works. But it also installs

pyqt                      4.11.4
qt                        4.8.7

If I want to remove them as suggested above, this will also remove Spyder.
Secondly when I install matplotlib as a package in the new environment Spyder is not able to connect to an IPython Kernel. If I remove matplotlib again, it can connect again.

@raysalemi
Copy link

These commands worked for me:

    559  conda install pyqt5=5.6.0
    560  conda install -c spyder-ide pyqt5
    561  spyder

The first one seems to simply demonstrate that 5.6.0 doesn't install.
The second one gives this:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    sip-4.18                   |           py27_0         245 KB  spyder-ide
    conda-4.1.5                |           py27_0         199 KB
    pyqt5-5.6.0                |           py27_0         4.3 MB  spyder-ide
    ------------------------------------------------------------
                                           Total:         4.7 MB

The following packages will be UPDATED:

    conda: 4.1.4-py27_0             --> 4.1.5-py27_0
    pyqt5: 5.5.0-py27_0  spyder-ide --> 5.6.0-py27_0 spyder-ide
    sip:   4.16.9-py27_0            --> 4.18-py27_0  spyder-ide

Proceed ([y]/n)? y

Now running spyder 3.

@drdadr
Copy link

drdadr commented Jun 30, 2016

@rdsalemi @kcarnold
Can either of you work with matplotlib? Or could try to add matplotlib and see if Spyder3 can connect to an IPython Console?

@raysalemi
Copy link

I'm afraid I'm not familiar with it.

@kcarnold
Copy link
Author

I installed matplotlib, started spyder, ran %matplotlib inline, and successfully made a simple plot. WorksForMe.

... but while writing this up, I got a segfault. The system traceback is utterly unhelpful:

Thread 1 Crashed:
0   libsystem_platform.dylib        0x00007fff83d39fbd _platform_memmove$VARIANT$Haswell + 157
1   interpreter.so                  0x0000000107667958 th_worker(void*) + 456
2   libsystem_pthread.dylib         0x00007fff907f099d _pthread_body + 131
3   libsystem_pthread.dylib         0x00007fff907f091a _pthread_start + 168
4   libsystem_pthread.dylib         0x00007fff907ee351 thread_start + 13

though thread 0 might have a clue:

Thread 0:: CrBrowserMain  Dispatch queue: com.apple.main-thread
0   QtCore.so                       0x000000011435c473 meth_QSocketNotifier_setEnabled(_object*, _object*) + 51
1   libpython3.5m.dylib             0x00000001000679d9 PyCFunction_Call + 233

Aside from that, my main spyder issue at the moment is I think #3223, for which I'm waiting for b4 release and running off trunk until then.

@ccordoba12
Copy link
Member

I hope you understand that we're in a testing phase and that not everything is expected to work flawlessly ;-)

As I said before, I'm preparing new Qt5 packages that hopefully will solve this problem, but I can't promise that they will work on all situations.

@raysalemi
Copy link

What? The free software in beta doesn't work perfectly?

This is an outrage!

@ccordoba12
Copy link
Member

Jeje, thanks for understanding @rdsalemi!

@ccordoba12 ccordoba12 changed the title Spyder 3.0 Beta3 fails to start Spyder 3.0 Beta3 fails to start in OS X Jun 30, 2016
@ccordoba12
Copy link
Member

I'll post new instructions here on how to install beta4 once I release it.

@ccordoba12
Copy link
Member

Ok, so these are the new instructions:

  • conda remove qt5 pyqt5
  • conda install -c spyder-ide spyder==3.0.0b4

This will update your qt and pyqt packages to 5.6.0 and will also fix (I hope) any problem with matplotlib. But now you need to run %matplotlib qt5 instead of %matplotlib qt :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants