Skip to content

Instantly share code, notes, and snippets.

@K90j1
Last active December 19, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save K90j1/5986717 to your computer and use it in GitHub Desktop.
Save K90j1/5986717 to your computer and use it in GitHub Desktop.
$ python -v
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
$ brew -v list
Homebrew 0.9.4
autoconf gettext libtiff node protobuf tree
cmake gfortran libxml2 openssl r unrar
colordiff git mcrypt pcre re2c wget
gd gsl mobile-shell pidof readline zsh
gdbm jpeg mysql pkg-config redis
$ pip install virtualenv
$ python /Library/Python/2.6/site-packages/virtualenv.py --no-site-packages treeio.env
$ cd treeio.env/
$ source bin/activate
$ git clone https://github.com/treeio/treeio.git
$ cd treeio
$ sudo env ARCHFLAGS="-arch x86_64" pip install lxml
Successfully installed lxml
Cleaning up...
$ sudo env ARCHFLAGS="-arch x86_64" pip install -r requirements.pip
Successfully installed Django Pygments south jinja2 coffin hashlib PIL html5lib oauth2 whoosh python-dateutil django-dajax django-dajaxice django-piston django-simple-captcha unidecode django-websocket docutils simplejson sphinx johnny-cache django-pandora httplib2 six Pillow
$ sudo pip uninstall PIL
$ sudo env ARCHFLAGS="-arch x86_64" pip install PIL
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.7
platform darwin 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)]
--------------------------------------------------------------------
--- TKINTER support available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
*** FREETYPE2 support not available
*** LITTLECMS support not available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.
To check the build, run the selftest.py script.
changing mode of build/scripts-2.6/pilconvert.py from 644 to 755
changing mode of build/scripts-2.6/pildriver.py from 644 to 755
changing mode of build/scripts-2.6/pilfile.py from 644 to 755
changing mode of build/scripts-2.6/pilfont.py from 644 to 755
changing mode of build/scripts-2.6/pilprint.py from 644 to 755
changing mode of /Users/bookair/Work/htdocs/stuff/treeio.env/bin/pilconvert.py to 755
changing mode of /Users/bookair/Work/htdocs/stuff/treeio.env/bin/pildriver.py to 755
changing mode of /Users/bookair/Work/htdocs/stuff/treeio.env/bin/pilfile.py to 755
changing mode of /Users/bookair/Work/htdocs/stuff/treeio.env/bin/pilfont.py to 755
changing mode of /Users/bookair/Work/htdocs/stuff/treeio.env/bin/pilprint.py to 755
Successfully installed PIL
Cleaning up...
$ sudo env ARCHFLAGS="-arch x86_64" pip install MySQL-python
Successfully installed MySQL-python
Cleaning up...
$ python related_fields_patch.py
$ mysql -u username -p
mysql> create database `treeio.db`;
mysql> grant all privileges on `treeio.db`.* to treeio@localhost identified by 'treeio';
mysql> \q
$ python manage.py installdb
Enter database engine <mysql,postgresql,oracle,sqlite3> (defaults to sqlite3): mysql
Enter database name (defaults to treeio.db):
Database user (defaults to treeio):
Database password: treeio
Hostname (empty for default):
Port (empty for default):
-- Installing database...
Syncing...
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
-- Successfully installed database.
-- You're ready to go!
$ mysql -u treeio -p treeio.db < sql/mysql-treeio-current.sql
$ python manage.py runserver
Validating models...
0 errors found
Django version 1.3, using settings 'treeio.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
http://localhost:8000
username: `admin` and password: `admin`
$pip freeze (will)
Coffin==0.3.8
Django==1.3
Jinja2==2.5.2
MySQL-python==1.2.4
PIL==1.1.7
Pillow==2.1.0
PyRSS2Gen==1.0.0
Pygments==1.3.1
South==0.8.1
Sphinx==1.2b1
Twisted==8.2.0
Unidecode==0.04.13
Whoosh==2.5.1
altgraph==0.6.8.dev
bdist-mpkg==0.4.3.dev
bonjour-py==0.3
django-dajax==0.8.4
django-dajaxice==0.2
django-pandora==0.1.0
django-piston==0.2.2
django-recaptcha==0.0.6
django-simple-captcha==0.3.8
django-websocket==0.3.0
docutils==0.10
hashlib==20081119
html5lib==0.90
httplib2==0.8
johnny-cache==1.4
lxml==3.2.1
macholib==1.2.1.dev
modulegraph==0.7.2.dev
numpy==1.2.1
oauth2==1.5.211
py2app==0.4.2
pyOpenSSL==0.7
pyobjc-core==2.2b3
pyobjc-framework-AddressBook==2.2b3
pyobjc-framework-AppleScriptKit==2.2b3
pyobjc-framework-Automator==2.2b3
pyobjc-framework-CFNetwork==2.2b3
pyobjc-framework-CalendarStore==2.2b3
pyobjc-framework-Cocoa==2.2b3
pyobjc-framework-Collaboration==2.2b3
pyobjc-framework-CoreData==2.2b3
pyobjc-framework-CoreText==2.2b3
pyobjc-framework-DictionaryServices==2.2b3
pyobjc-framework-ExceptionHandling==2.2b3
pyobjc-framework-FSEvents==2.2b3
pyobjc-framework-InputMethodKit==2.2b3
pyobjc-framework-InstallerPlugins==2.2b3
pyobjc-framework-InstantMessage==2.2b3
pyobjc-framework-InterfaceBuilderKit==2.2b3
pyobjc-framework-LatentSemanticMapping==2.2b3
pyobjc-framework-LaunchServices==2.2b3
pyobjc-framework-Message==2.2b3
pyobjc-framework-PreferencePanes==2.2b3
pyobjc-framework-PubSub==2.2b3
pyobjc-framework-QTKit==2.2b3
pyobjc-framework-Quartz==2.2b3
pyobjc-framework-ScreenSaver==2.2b3
pyobjc-framework-ScriptingBridge==2.2b3
pyobjc-framework-SearchKit==2.2b3
pyobjc-framework-SyncServices==2.2b3
pyobjc-framework-SystemConfiguration==2.2b3
pyobjc-framework-WebKit==2.2b3
pyobjc-framework-XgridFoundation==2.2b3
python-dateutil==1.5
simplejson==3.3.0
six==1.3.0
whatever==0.2.2
wsgiref==0.1.2
wxPython==2.8.8.1
wxPython-common==2.8.8.1
wxaddons==2.8.8.1
xattr==0.5
zope.interface==3.5.1
$ deactivate
STACK 1 (architecture error. Need to set ARCHFLAGS to USE PIP )
$ sudo pip install -r requirements.pip
Downloading/unpacking Pillow>=2.0.0 (from django-simple-captcha->-r requirements.pip (line 15))
Downloading Pillow-2.1.0.zip (2.1MB): 2.1MB downloaded
Running setup.py egg_info for package Pillow
warning: no previously-included files found matching '.hgignore'
warning: no previously-included files found matching '.hgtags'
warning: no previously-included files found matching 'BUILDME.bat'
warning: no previously-included files found matching 'make-manifest.py'
warning: no previously-included files found matching 'SHIP'
warning: no previously-included files found matching 'SHIP.bat'
warning: no files found matching 'COPYING'
warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching 'README' under directory 'docs'
warning: no files found matching 'CHANGES' under directory 'docs'
warning: no files found matching 'CONTENTS' under directory 'docs'
Installing collected packages: hashlib, PIL, oauth2, django-dajax, django-dajaxice, django-simple-captcha, docutils, sphinx, johnny-cache, httplib2, six, Pillow
Running setup.py install for hashlib
Using OpenSSL version 0x0090812f from
Headers: /usr/include
Library: /usr/lib/libssl.dylib
building '_hashlib' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c Modules/_hashopenssl.c -o build/temp.macosx-10.6-universal-2.6/Modules/_hashopenssl.o
/Developer/usr/bin/../libexec/gcc/powerpc-apple-darwin9/4.2.1/as: assembler (/Developer/usr/bin/../libexec/as/ppc/as or /Developer/usr/bin/../local/libexec/as/ppc/as) for architecture ppc not installed
Installed assemblers are:
/Developer/usr/bin/../libexec/as/x86_64/as for architecture x86_64
/Developer/usr/bin/../libexec/as/i386/as for architecture i386
/Developer/usr/bin/../libexec/as/arm/as for architecture arm
Modules/_hashopenssl.c:524: fatal error: error writing to -: Broken pipe
compilation terminated.
lipo: can't open input file: /var/tmp//ccvQ8W0Y.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/tmp/pip-build-root/hashlib/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hvhy76-record/install-record.txt --single-version-externally-managed:
Using OpenSSL version 0x0090812f from
Headers: /usr/include
Library: /usr/lib/libssl.dylib
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-universal-2.6
copying hashlib.py -> build/lib.macosx-10.6-universal-2.6
running build_ext
building '_hashlib' extension
creating build/temp.macosx-10.6-universal-2.6
creating build/temp.macosx-10.6-universal-2.6/Modules
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c Modules/_hashopenssl.c -o build/temp.macosx-10.6-universal-2.6/Modules/_hashopenssl.o
/Developer/usr/bin/../libexec/gcc/powerpc-apple-darwin9/4.2.1/as: assembler (/Developer/usr/bin/../libexec/as/ppc/as or /Developer/usr/bin/../local/libexec/as/ppc/as) for architecture ppc not installed
Installed assemblers are:
/Developer/usr/bin/../libexec/as/x86_64/as for architecture x86_64
/Developer/usr/bin/../libexec/as/i386/as for architecture i386
/Developer/usr/bin/../libexec/as/arm/as for architecture arm
Modules/_hashopenssl.c:524: fatal error: error writing to -: Broken pipe
compilation terminated.
lipo: can't open input file: /var/tmp//ccvQ8W0Y.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/private/tmp/pip-build-root/hashlib/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hvhy76-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/tmp/pip-build-root/hashlib
Storing complete log in /Users/bookair/Library/Logs/pip.log
STACK 2 (maybe permission error? Need reinstall PIL)
ViewDoesNotExist at /accounts/login
Could not import captcha.views. Error was: The _imaging C module is not installed
Request Method: GET
Request URL: http://localhost:8000/accounts/login
Django Version: 1.3
Exception Type: ViewDoesNotExist
Exception Value:
Could not import captcha.views. Error was: The _imaging C module is not installed
Exception Location: /Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/site-packages/django/core/urlresolvers.py in _get_callback, line 167
Python Executable: /Users/bookair/Work/htdocs/stuff/treeio.env/bin/python
Python Version: 2.6.1
Python Path:
['/Users/bookair/Work/htdocs/stuff/treeio.env/treeio',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/site-packages/pip-1.3.1-py2.6.egg',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python26.zip',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/plat-darwin',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/plat-mac',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/plat-mac/lib-scriptpackages',
'/Users/bookair/Work/htdocs/stuff/treeio.env/Extras/lib/python',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/lib-tk',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/lib-old',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/site-packages',
'/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/site-packages/PIL']
$ python
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import PIL
>>> import Image
>>> import _imaging
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/site-packages/PIL/_imaging.so, 2): Symbol not found: _TIFFClientOpen
Referenced from: /Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/site-packages/PIL/_imaging.so
Expected in: flat namespace
in /Users/bookair/Work/htdocs/stuff/treeio.env/lib/python2.6/site-packages/PIL/_imaging.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment