Install Syncplay on macOS 10.8+

[UPDATE: 26/01/2018]

Starting from version 1.5.0, Syncplay supports macOS. A packaged app can be downloaded directly from the official website. This version does not require any manual installation and is compatible with macOS 10.10+. Do not proceed with this guide unless you need to manually install Syncplay from sources.


This post contains a few tips to install the latest version of Syncplay on macOS. I have personally tested these instructions on macOS 10.11 El Capitan and 10.12 Sierra, but they should work also on older systems with minor corrections. A basic knowledge of how to use a bash terminal is advisable.

If you want to use Syncplay on your Mac, I encourage you to test these instructions. We need to check if our patches work so that we can validate them and proceed to further improvements. Please write in the comments if you encounter any issues following these instructions, I will try to help.

In the following, I provide two methods to install Syncplay: using homebrew or using miniconda. Both methods present advantages and drawbacks that I will not discuss here. At this moment, both methods allow to use Syncplay without any major bugs. Choose the type of installation that you prefer. Note: please do not attempt to use the two methods together, as this may cause conflicts between the two versions of python. If you have issues, ask in the comments before attempting to run the second method.

1) Prerequisites

First of all, it is advisable to update your macOS system to the latest revision available (e.g. 10.11.6 for El Capitan).
Then, install the Command Line Tools for macOS, needed to compile all the packages installed hereafter. Open the Terminal app (located in /Applications/Utilities/) and run

xcode-select --install

Accept the license and proceed with the installation. Then close and re-open the Terminal app. To verify the installation of the Command Line Tools, run

gcc -v

The output should look like this

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

If so, proceed with your favorite installation method. Please follow only one of the two installation procedures. Go to 2a) for miniconda and to 2b) for homebrew.

2a) Instructions for miniconda

Download the miniconda installer script from the official website (macOS, Python 2.7, 64-bit bash installer). Access the download folder, usually by executing

cd ~/Downloads

and install miniconda by running

chmod +x Miniconda2-latest-MacOSX-x86_64.sh
./Miniconda2-latest-MacOSX-x86_64.sh

Close and re-open the Terminal app.

Create a dedicated environment for syncplay by running

conda create -n syncplay python pyside

Access this new environment by running

source activate syncplay

Your terminal prompt should now start with (syncplay) before your hostname.

Install the other dependencies inside the conda environment

pip install twisted appnope pyobjc

Exit from the dedicated conda environment

source deactivate syncplay

Everything you need to run Syncplay is now installed. Go to 3) to to download Syncplay.

2b) Instructions for homebrew

Install homebrew. On Terminal, paste an run this:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Proceed to install Python from homebrew

brew install python

This command will install a separate version of Python 2.7 on your system. Please note that, in the latest recipes, this command installs the executable as python2 (and pip2), to avoid confusion with the included system version, which stays reachable as python instead. You can use these separate commands or edit your $PATH accordingly. In the following, I will use the separate commands.

Install the latest patched version of PySide 1.2

brew tap cartr/qt4
brew tap-pin cartr/qt4
brew install pyside

Install the other dependencies

pip2 install twisted appnope pyobjc

Everything you need to run Syncplay is now installed. Go to 3) to download Syncplay.

3) Download Syncplay from GitHub

Clone the git repository of Syncplay on your Mac

cd ~
git clone https://github.com/Syncplay/syncplay.git

This will create a syncplay folder in your Home folder containing all the software code. Go to the next step to set up your preferred media player.

4) Choose your media player: VLC or mpv

If you want to use VLC as player, you need to copy a script file inside the VLC.app package. Enter in the folder in which you cloned syncplay from git by executing

cd ~/syncplay

and run

cp resources/lua/intf/syncplay.lua /Applications/VLC.app/Contents/MacOS/share/lua/intf/

Now you can use VLC with syncplay.

Instead, if you want to use mpv, there is no extra command needed.

You may now proceed to the next step.

5) Run Syncplay

Enter in the folder in which you cloned Syncplay by typing

cd ~/syncplay

If you used miniconda (2a), run

source activate syncplay
./syncplayClient.py

If you used homebrew (2b), run

python2 syncplayClient.py

Syncplay should now open. If you encounter any error, please comment here pasting the Terminal output.

Comments and known issues

Please, report any issue you will find using Syncplay on macOS here or on the GitHub page of the project.

14 comments on “Install Syncplay on macOS 10.8+”:

  1. Having tried some version of the process that used miniconda months ago and just now trying the brew method, I got the following error:

    Computer:~ duamer$ cd ~/syncplay
    Computer:syncplay duamer$ python2 syncplayClient.py
    Could not import GUI libraries. If you do not have PySide installed then you will need to install it for the GUI to work.
    Hostname can’t be empty!
    Some necessary arguments are missing, refer to –help

    I checked and seem to have everything up to date:
    Computer:~ duamer$ brew upgrade python cmake qt pyside
    Updating Homebrew…
    Error: python 2.7.13_1 already installed
    Error: cmake 3.9.2 already installed
    Error: qt 5.9.1 already installed
    Error: cartr/qt4/pyside@1.2 1.2.2_1 already installed

    1. I wonder why you have Pyside from cartr, which relies on Qt 4, and a version of Qt 5. Anyway, try to open a python console by running “python2” from your terminal and then execute the following commands

      import PySide
      print PySide.__version__
      print PySide.QtCore.__version__
      print PySide.QtCore.qVersion()

      Report the results here. In any case, if you only need to run Syncplay, I suggest deleting Qt 5 from your system by running “brew uninstall qt” and then reinstall manually Qt 4 by running “brew install qt@4”. Also, did you remember to install appnope? Run “pip2 install appnope” just in case. I added this dependency quite recently, so maybe you missed it. Let me know if this helps.

      1. Computer:~ user$ python2
        Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:43:17)
        [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
        Type “help”, “copyright”, “credits” or “license” for more information.
        Anaconda is brought to you by Continuum Analytics.
        Please check out: http://continuum.io/thanks and https://anaconda.org
        >>> import PySide
        Traceback (most recent call last):
        File “”, line 1, in
        ImportError: No module named PySide

        I tried “brew install qt”, but got a number of errors. I’m asking a friend to try it on his system to see if maybe something’s weird with my system.

        1. Ok, so I ran “port install py27-pyside” and also you suggestions. You suggestions got me:

          Computer:~ user$ brew uninstall qt
          Uninstalling /usr/local/Cellar/qt/5.9.1… (9,019 files, 280MB)
          qt 5.7.1_1 1 is still installed.
          Remove all versions with `brew uninstall –force qt`.
          Computer:~ user$ brew install qt@4
          Warning: cartr/qt4/qt@4 4.8.7_2 is already installed
          Computer:~ user$ pip2 install appnope
          Requirement already satisfied: appnope in ./miniconda2/lib/python2.7/site-packages

          On trying to launch Syncplay:

          Computer:syncplay benjorr$ python2 syncplayClient.py
          Could not import GUI libraries. If you do not have PySide installed then you will need to install it for the GUI to work.
          [22:24:20] Attempting to connect to syncplay.pl:8995
          Unhandled Error
          Traceback (most recent call last):
          File “/Users/benjorr/syncplay/syncplay/clientManager.py”, line 13, in run
          syncplayClient.start(config[‘host’], config[‘port’])
          File “/Users/benjorr/syncplay/syncplay/client.py”, line 671, in start
          reactor.run()
          File “/Users/benjorr/miniconda2/lib/python2.7/site-packages/twisted/internet/base.py”, line 1199, in run
          self.mainLoop()
          File “/Users/benjorr/miniconda2/lib/python2.7/site-packages/twisted/internet/base.py”, line 1208, in mainLoop
          self.runUntilCurrent()
          — —
          File “/Users/benjorr/miniconda2/lib/python2.7/site-packages/twisted/internet/base.py”, line 828, in runUntilCurrent
          call.func(*call.args, **call.kw)
          File “/Users/benjorr/syncplay/syncplay/players/mpv.py”, line 21, in run
          return NewMpvPlayer(client, MpvPlayer.getExpandedPath(playerPath), filePath, args)
          File “/Users/benjorr/syncplay/syncplay/players/mplayer.py”, line 34, in __init__
          self._listener = self.__Listener(self, playerPath, filePath, args)
          File “/Users/benjorr/syncplay/syncplay/players/mplayer.py”, line 301, in __init__
          self.__process = subprocess.Popen(call, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
          File “/Users/benjorr/miniconda2/lib/python2.7/subprocess.py”, line 711, in __init__
          errread, errwrite)
          File “/Users/benjorr/miniconda2/lib/python2.7/subprocess.py”, line 1343, in _execute_child
          raise child_exception
          exceptions.OSError: [Errno 13] Permission denied

          [22:24:21] has joined the room: ‘Akibastar’

          Hello Duamer,

          The Syncplay latest is available from http://syncplay.pl/

          [22:24:21] Successfully connected to server
          In room ‘Akibastar’:
          ** is not playing a file

  2. I am sorry, but you should not install dependencies with different package managers (e.g. macports and homebrew), because they are not linked to the same version of python. Right now, your “python2” and “pip2” point on miniconda instead that on homebrew’s python, which is why you are getting the “PySide not found” error in the first place. You can verify this by running “which python2” in your terminal.

    At this moment, I suggest you to focus only on one environment, I recommend homebrew because it seems you have everything you need in there, you just cannot reach the right python executable. To do that, you should uninstall miniconda at all, just follow any online guide. If you cannot for any reason, just edit your ~/.bash_profile to temporarily remove the miniconda folder from your $PATH. If you do not know how to do this, paste here the content of your .bash_profile file, you can get it by running “more ~/.bash_profile”.

  3. Getting the following when launching Syncplay:

    (syncplay) Basils-MacBook-Pro:syncplay basilgray$ python2 syncplayClient.py
    Qt internal error: qt_menu.nib could not be loaded. The .nib file should be placed in QtGui.framework/Versions/Current/Resources/ or in the resources directory of your application bundle.
    Abort trap: 6

    On 10.12.6 and tried with both homebrew and miniconda. Any advice?

    1. Please, do not try both methods together, since this causes several conflicts, as you might have read in the previous comments. In any case, it looks like a wrong Qt binding to me.

      Try to enter in the conda environment (source activate syncplay) and execute the client with ./syncplayClient.py (instead of using python2). If that does not work, report the error.

      Then try to open a python console by running “python” (while still being in the syncplay environment, please do not use python2) and execute

      import PySide
      print PySide.__version__
      print PySide.QtCore.__version__
      print PySide.QtCore.qVersion()

      Please report all the results here.

  4. Hello, we weren’t able to make it work with miniconda on my friend’s laptop but homebrew worked. We managed to open the interface, input settings and all, but once you click “save and run”, it crashes and we get this:
    macteki-MacBook-Pro:syncplay mac$ python2 syncplayClient.py
    2017-10-08 02:21:50.402 Python[13996:27506] modalSession has been exited prematurely – check for a reentrant call to endModalSession:
    Traceback (most recent call last):
    File “syncplayClient.py”, line 19, in
    SyncplayClientManager().run()
    File “/Users/mac/syncplay/syncplay/clientManager.py”, line 9, in run
    interface = ui.getUi(graphical=not config[“noGui”])
    File “/Users/mac/syncplay/syncplay/ui/__init__.py”, line 9, in getUi
    ui = GraphicalUI()
    NameError: global name ‘GraphicalUI’ is not defined

    1. Sorry, that’s my fault, we patched a bug recently and I forgot to update these instructions. Please, run “pip2 install pyobjc” and then run Syncplay again. Thanks.

  5. Please help. I installed with brew and miniconda. Then, I removed miniconda. Now, I’m having trouble with PySide. For some reason, it just seems to loop for hours when I try to download it. Now, I just want to run syncplay without the gui. How do I do that?

    1. `python2 syncplayClient.py –no-gui -a ip.secret.ip.address -r yay –player-path VLC` doesn’t work i get
      $ python2 syncplayClient.py –no-gui -a 192.168.1.2 -r yay –player-path VLC
      Player path is not set properly. Supported players are: mpv, VLC, MPC-HC and mplayer2.!
      Some necessary arguments are missing, refer to –help

      1. I think that you should set -player-path /Applications/VLC.app/Contents/MacOS/VLC . In any case, we are going to release a packed .dmg for macOS soon, removing the need for you to install and run Syncplay from the command line.

Leave a Reply to alby128 Cancel reply

Your email address will not be published. Required fields are marked *