forked from psychopy/psychopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildingOnAMac.txt
207 lines (137 loc) · 6.15 KB
/
buildingOnAMac.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
Building on a mac
=================
Standalone PsychoPy is currently built using Framework Python 2.7 (not system python or enthought distributions). The following deals with how to set up a complete working python using that distribution under Snow Leopard (10.6). To get PsychoPy working on other python installations see the additional headers below that.
Framework Version
~~~~~~~~~~~~~~~~~~
brew install wxpython hdf5
pip install numpy scipy matplotlib
pip install pyglet pillow openpyxl pandas configobj lxml
pip install pyyaml gevent msgpack-python psutil tables
pip install pyobjc #mac only
pip install pytest sphinx cython cffi
pip install ipython tornado pyzmq jinja2 jsonschema
pyserial parallel
pip install seaborn psychopy_ext
pip install vlc python-bidi
pip install rusocsci
pip install pyxid
pip install ioLabs
pip install pylink
# or all in one go:
pip install pyglet pillow openpyxl pandas configobj lxml pyyaml gevent msgpack-python pytest sphinx cython cffi ipython tornado pyzmq jinja2 jsonschema pyxid ioLabs pylink pyserial python-bidi seaborn psychopy_ext rusocsci
psutil
#mac only (and time consuming):
pip install pyobjc
#PC and linux:
pip install parallel
# very optional
pip install pp #replaced by multiprocessing core lib?
#pygame on OSX:
brew install hg sdl sdl_image sdl_mixer sdl_ttf portmidi
pip install hg+http://bitbucket.org/pygame/pygame
Old tips
~~~~~~~~~~~
There used to be a problem with lxml and it had to be compiled like this:
STATIC_DEPS=true easy_install -Z lxml
If you get build errors trying to easy_install::
cc1: error: unrecognized command line option "-Wno-long-double"
edit the file lib/python2.5/config/Makefile and remove that
flag from the BASECFLAGS. Also in this file set::
MACOSX_DEPLOYMENT_TARGET=10.5 and CC=gcc-4.0 ?
manual installs
===================
Install avbin for movies
labjack (you might prefer to use my fork of that at https://github.com/peircej/LabJackPython so that each file installs under site-packages/labjack)
compiled libs
==================
#hdf5 (needed for pytables or you get errors about symbols not found)
cd hdf5-1.8.9
CFLAGS='-arch i386' LDFLAGS='-arch i386' ./configure --prefix=/usr/local/ make
sudo make install
#ioHub also requires
# greenlet, gevent, msgpack-python, pyYAML
System python
~~~~~~~~~~~~~~
The following cannot be installed to 64bit python because they use carbon:
- wxpython (cocoa support expected in version 3.0)
- pyglet (cocoa support half-built last JWP looked)
- pygame/SDL
BUT, change to use 32bit python2.6 or 2.5 by adding the following to
bash_profile:
export VERSIONER_PYTHON_VERSION=2.6
export VERSIONER_PYTHON_PREFER_32_BIT=yes
Python should show compiled on GCC4.2 (sys python) and sys.maxint
should be 2147483647 (32bit)
Install these to Framework python (from python.org) and then copy over
=================================================================
- numpy (downloaded from SF)
- scipy (downloaded from SF)
ENTHOUGHT VERSION
~~~~~~~~~~~~~~~~~~
- install EPD version 6.1
- install avbin
- install pygame (see below)
easy_install
=============
sudo easy_install -Z bdist_mpkg
sudo easy_install -Z py2app
sudo easy_install -Z pyobjc
sudo easy_install -Z pyobjc
sudo easy_install -Z pyobjc-framework-qtkit
Note: This approach has worked well to created the manual version but
the standalone app doesn't run on other machines It complains about
numpy/lapack not loading correct object
Problems with installing
~~~~~~~~~~~~~~~~~~~~~~~~~
installing pygame
==================
pyjama is no longer a core dependency. It hasn’t been released since 2009 and probably won’t work under 64bit python but you might find the following to help if you need it for something:
I downloaded the version for pygame-1.9.1release-py2.6-macosx10.5.
This complains that it can't install on this system. Open the
installed bundle and from Contents/Packages install each of dependent
frameworks:
- pygame-SDL
- pygame-SDL_ttf
- pygame-SDL_mixer
- pygame-SDL_iamge
- pygame-headers
- pygame-smpeg
Then open the contents of bundle
- pygame-platlib
and drag the pygame and egg.info folders to your site packages.
Problems building the app using py2app (not for users normally)
==============================================================================
DistutilsFileError: /Library/Frameworks/Python.framework/Versions
------------------------------------------------------------------
This is caused by py2ap trying to find python2.5/pyconfig.h which may not exist.
Hack: add the following to the begin of py2app/util.py copy_file (around line 100):
if path=="/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h":
path="/Library/Frameworks/Python.framework/Versions/6.1/include/python2.6/pyconfig.h"
You may also get messages about not being able to locate pyconfig.h
during copy_file caused by the fact that py2app thinks that enthought
python(6.1) should be installed
TypeError: 'NoneType' object is unsubscriptable (in modulegraph.find_needed_modules)
-------------------------------------------------------------------------------------
This indicates that one of your required modules couldn't be
found. Check your easy_install.pth to make sure that all the required
modules have their paths there.
To make avbin work from the mac standalone:
--------------------------------------------
In pyglet/lib.py, around line 166, do this:
search_path.append(os.path.join(sys.prefix, '..', 'Frameworks'))
instead (or as well as) of
search_path.append(os.path.join(
os.environ['RESOURCEPATH'],
'..',
'Frameworks',
libname))
To build a 32-bit ffmpeg dylib
--------------------------------
For each codec, download the source and do:
CFLAGS='-arch i386' LDFLAGS='-arch i386' configure --disable-static --enable-shared
make
sudo make install
Then for ffmpeg source do:
configure --disable-static --enable-shared --disable-outdev=sdl --enable-runtime-cpudetect --disable-indev=jack --enable-zlib --enable-libx264 --enable-libxvid --enable-libvorbis --cc="clang -m32" --enable-gpl
make
sudo make install