Skip to content

Instantly share code, notes, and snippets.

vagrant@vagrant:~/PyDoubanFM$ python fm.py
Playing: 12 Etudes - No 7. Pour les degres chromatiques
** (fm.py:11935): WARNING **: Command line `dbus-launch --autolaunch=3923027668d604d7c9a04edc0000011e --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n
** (fm.py:11935): WARNING **: Command line `dbus-launch --autolaunch=3923027668d604d7c9a04edc0000011e --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n
** (fm.py:11935): WARNING **: Command line `dbus-launch --autolaunch=3923027668d604d7c9a04edc0000011e --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n
** (fm.py:11935): WARNING **: Command line `dbus-launch --autolaunch=3923027668d604d7c9a04edc0000011e --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n
@luchuan
luchuan / gist:4343636
Created December 20, 2012 07:54
Mac OS 10.7.5 brew安装phash错误
luc:python-packages luc631$ brew install pHash
==> Installing phash dependency: cimg
==> Downloading http://downloads.sourceforge.net/cimg/CImg-1.5.2.zip
######################################################################## 100.0%
/usr/local/Cellar/cimg/1.5.2: 442 files, 33M, built in 51 seconds
==> Installing phash dependency: fftw
==> Downloading http://www.fftw.org/fftw-3.3.2.tar.gz
######################################################################## 100.0%
==> ./configure --enable-single --enable-sse --enable-shared --prefix=/usr/local/Cellar/fftw/3.3.2 --enable-threads
==> make install
@luchuan
luchuan / gist:4343611
Last active May 27, 2021 19:04
hack HomeBrew for installing phash and its python binding under Mac OS 10.7.5
cd /usr/local/Library/Formula
vim phash.rb 将内容改为 https://gist.github.com/4343605 所示
brew install phash --disable-video-hash --disable-audio-hash
git clone https://github.com/luchuan/py-phash.git
cd py-phash; python setup install
require 'formula'
class Phash < Formula
homepage 'http://www.phash.org/'
url 'http://www.phash.org/releases/pHash-0.9.5.tar.gz'
#sha1 '9710b8a1d4d24e7fc3ac43c33eac8e89d9e727d7'
sha1 '87ce165b344bb859f5fdaf7c1776b556db3d8a15'
depends_on 'cimg' unless build.include? "disable-image-hash" and build.include? "disable-video-hash"
depends_on 'ffmpeg' unless build.include? "disable-video-hash"