Opened 6 years ago

Closed 5 years ago

#58445 closed defect (fixed)

Spyder fails to build on OS X 10.7 (Lion)

Reported by: SenileFelineS Owned by: reneeotten (Renee Otten)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), reneeotten (Renee Otten), SenileFelineS
Port: py-spyder qt56-qtwebengine py27-pyqt5-webengine

Description

I'm attempting to install py27-Spyder on my Mac OS X 10.7 Lion system.

The installation fails when attempting to install qt56-qtwebengine. The following error is thrown:

Error: qt56-qtwebengine requires OS X 10.9 or later
Error: Failed to fetch qt56-qtwebengine: incompatible OS version

This seems to explain the issue: https://trac.macports.org/ticket/55651#comment:5

Is there any way to use a qt55-based port to install Spyder? Would QtWebkit be an alternative?

Attachments (2)

installed-active-grep-qt5.txt (950 bytes) - added by SenileFelineS 6 years ago.
Portfile (6.1 KB) - added by reneeotten (Renee Otten) 6 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 6 years ago by SenileFelineS

Owner: set to reneeotten
Status: newassigned
Version: 2.5.4

comment:2 Changed 6 years ago by SenileFelineS

Owner: changed from reneeotten to SenileFelineS
Port: qt56-qtwebengine py27-pyqt5-webengine added

comment:3 Changed 6 years ago by SenileFelineS

Cc: SenileFelineS added
Owner: changed from SenileFelineS to reneeotten

comment:4 Changed 6 years ago by reneeotten (Renee Otten)

It's probably not a good idea to override what the Qt5 PortGroup sets as the latest Qt version supported on the platform, which is indeed Qt 5.6 on Mac OS X Lion (10.7); I would imagine that this could cause trouble for other ports down the road. It's a known issue that QtWebEngine does not work for Qt 5.6 despite all Marcus his attempts - and it's therefore unlikely that this will be resolved.

If you're willing to help to do some testing on your system and we can establish that QtWebkit is a viable alternative to QtWebEngine (I tried only quickly and it seems to work for me, but with Qt 5.12.3), then I am happy to add a variant for this that can be set as the default on older systems.

Can you please first post the output of port installed active | grep qt5? If py27-pyqt5 is not installed yet (or not with the right variant), please do sudo port -dv install py27-pyqt5 +webkit. If that all works, let's make sure all the other, minimal dependencies for py27-spyder are installed:

sudo port install py27-chardet py27-cloudpickle py27-codestyle py27-jedi py27-keyring py27-nbconvert py27-numpydoc py27-pickleshare py27-psutil py27-pyflakes py27-pygments py27-pylint py27-qtawesome py27-qtconsole py27-qtpy py27-rope py27-sphinx py27-spyder-kernels py27-zmq

Finally, please test whether spyder works as intended by running it directly from the source checkout:

sudo port extract py27-spyder
cd `port dir py-spyder`/work/spyder-3.3.4
python2.7 boostrap.py --gui=pyqt5

Thanks and let us know how it goes!

Renee

comment:5 Changed 6 years ago by mf2k (Frank Schima)

Port: py-spyder added; py27-spyder removed

comment:6 in reply to:  4 Changed 6 years ago by SenileFelineS

Replying to reneeotten:

It's probably not a good idea to override what the Qt5 PortGroup sets as the latest Qt version supported on the platform, which is indeed Qt 5.6 on Mac OS X Lion (10.7); I would imagine that this could cause trouble for other ports down the road. It's a known issue that QtWebEngine does not work for Qt 5.6 despite all Marcus his attempts - and it's therefore unlikely that this will be resolved.

I tested the Anaconda 4.2 release on my Mac OS X 10.7 system and at first glance it appears that their version of Spyder uses Qt5.6 with QtWebEngine. Could a solution be gleaned from Anaconda's implementation?

If you're willing to help to do some testing on your system and we can establish that QtWebkit is a viable alternative to QtWebEngine (I tried only quickly and it seems to work for me, but with Qt 5.12.3), then I am happy to add a variant for this that can be set as the default on older systems.

The output of port installed active | grep qt5 is attached. ...And after following your instructions, Spyder (3.3.4) works!

It's interesting that this works, considering that Anaconda can't provide me with a functioning version of Spyder above 3.3.0 due to some issue with the dependency libsodium.

I suppose this means that Macports currently provides a better solution to the newest version of Spyder (3.3.4) than Anaconda on OS X 10.7 using QtWebkit!

Last edited 6 years ago by SenileFelineS (previous) (diff)

Changed 6 years ago by SenileFelineS

comment:7 Changed 6 years ago by reneeotten (Renee Otten)

Great, I am glad it worked!

I don't know about Qt5.6 with QtWebEngine. It appears this was deemed as low priority and I personally have no intention to look into it; I can change the py-spyder port to support WebKit instead. I will add a webkit variant and set that as the default for Qt / Mac OSX that cannot build QtWebEngine (might take a few days).

Please note: this does require pyXY-pyqt5 +webkit, which is a non-default variant of the py-pyqt5 port. It is, therefore, up to the end-user to make sure that port is installed before installing py-spyder or the build will error out with a message explaining this (it is not possible to enforce a variant in a Portfile).

Changed 6 years ago by reneeotten (Renee Otten)

Attachment: Portfile added

comment:8 Changed 6 years ago by reneeotten (Renee Otten)

can you please try the Portfile I just attached to this ticket? If it all works as intended I will commit this change. Some instructions in case you're not familiar with how to do this...

  1. download the Portfile and copy it into the macports tree: sudo cp Portfile `port dir py-spyder`
  2. just to be sure do sudo port clean --all py*-spyder
  3. please check that the webkit variant is indeed the default on your system (port info py27-spyder, this should show you Variants: docs, no_anti_alias, pil, small, [+]webkit).
  4. install Spyder sudo port install py27-spyder; if you have py27-pyqt5 +webkit already installed this should work as is, otherwise it will tell you that you need the webkit variant of the py27-pyqt5 port.

Ideally, this should give you a working version of Spyder; please let me know if this works or if you run into any trouble.

comment:9 in reply to:  8 Changed 6 years ago by SenileFelineS

Last edited 6 years ago by SenileFelineS (previous) (diff)

comment:10 in reply to:  8 Changed 6 years ago by SenileFelineS

Replying to reneeotten:

It worked! I did notice a slight difference between the test that we did earlier that involved boostrap.py, namely: Spyder created a .spyder3-27/ directory in my home folder, rather than relying on the existing .spyder/ directory that already existed in my home folder (created while using Anaconda's Spyder). It picked up all of the preferences that already existed in .spyder/ in the earlier test. Was this a recent change?

comment:11 Changed 6 years ago by reneeotten (Renee Otten)

In the earlier test you we're running Spyder using boostrap.py without installing it, then it was using the "default" configuration directory .spyder, which is also used by the Anaconda version. Since MacPorts allows different version of Spyder (e.g., for different Python versions or the -devel version to be installed simultaneously, it was decided to have them use their own configuration directory (hence the addition of the "spyder-version"-"python-version" after .spyder. So, this is expected behavior and has been like this at least for several years.

In your earlier (now deleted) comment you mentioned that you didn't see the [+]webkit as a default variant when you did port info py27-spyder. I would like to make sure this actually works correctly before committing this, did this work in the end (I realize that you might have needed to do a portindex for it to pick up the change, sorry about that)?

comment:12 in reply to:  11 Changed 6 years ago by SenileFelineS

Replying to reneeotten:

In your earlier (now deleted) comment you mentioned that you didn't see the [+]webkit as a default variant when you did port info py27-spyder. I would like to make sure this actually works correctly before committing this, did this work in the end (I realize that you might have needed to do a portindex for it to pick up the change, sorry about that)?

It did work. I renamed the file Portfile to Portfile.txt foolishly just so I could quickly open it with a text editor to read it. After I removed the .txt extension, it worked!

comment:13 in reply to:  11 Changed 6 years ago by SenileFelineS

Replying to reneeotten:

I suppose it's worth mentioning:

  1. When I launch spyder-2.7, it attempts to launch a second application from the Dock called Python from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/. This application dies before fully launching.
  2. The terminal from which I launched spyder-2.7 from throws this error twice to the terminal output:
    dbus[50808]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
    
Last edited 6 years ago by SenileFelineS (previous) (diff)

comment:14 Changed 5 years ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

In 7cf7b7418233c8c21db4fe193bc02a6eea68bc1a/macports-ports (master):

py-spyder: add webkit variant

Add support for older Mac OS X systems (<= 10.8) that cannot install
QtWebEngine. It will still require user intervention since this needs
the non-default "webkit" variant for py-pyqt5.

Closes: #58445

Note: See TracTickets for help on using tickets.