-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-packages-linux.txt
executable file
·353 lines (240 loc) · 7.66 KB
/
setup-packages-linux.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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
Current Versions:
o Python 2.7.9
o pyserial 2.7
o QT 4.8.6
o SIP 4.16.4
o PyQt 4.11.3
o numpy 1.9.1
o scipy 0.14.1
o matplotlib 1.4.2
o MinimalModbus 0.5
o pyemf 2.0.0
o cx_freeze (tip from 2013-03-26)
o patchelf
o bbfreeze 1.2.0
o pymodbus 1.3.0
o yoctopuce 1.10.17849
o requests 2.3.0
o gevent-1.0.1
o bottle 0.12.7
o gevent-websocket-0.9.3
o python-qrcode 5.1
Upgrade History:
- 2014-12-31
. python-qrcode 5.1
. Python 2.7.8 => 2.7.9
- 2014-11-07
. PyQt 4.11.2 => 4.11.3
. numpy 1.9.1RC1 => 1.9.1
- 2014-10-30
. Python 2.7.6 => 2.7.8
. Qt 4.8.5 => 4.8.6
. SIP 4.14.6 => 4.16.4
. PyQt 4.10.1 => 4.11.2
. numpy 1.8.2 => 1.9.1RC1
. matplotlib 1.3.1 => 1.4.2
. added pymodbus 1.3.0
. added yoctopuce 1.10.17849
. added requests 2.3.0
. added gevent-1.0.1
. added bottle 0.12.7
. added gevent-websocket-0.9.3
- 2014-04-02
. minimalmodbus 0.4 => 0.5
- 2014-01-11:
. Phidgets Python 2.1.8 6/2013 => 2.1.8 7/2013
- 2013-11-29:
. Python 2.7.3 => 2.7.6
. pyserial 2.6 => 2.7
. QT 4.8.4 => 4.8.5
. SIP 4.14.6 => 4.15.3
. PyQt 4.10.1 => 4.10.3
. numpy 1.7.1 => 1.8.0
. scipy 0.12.0 => 0.13.1
. matplotlib 1.2.1 => 1.3.1
. bbfreeze 1.1.0 => 1.2.0
- 2013-05-14: Added pyemf 2.0.0
- 2013-05-02: Started
Installation Instructions:
0) Prepare System
- Ubuntu 12.04
Update system:
# sudo apt-get update
# sudo apt-get dist-upgrade
Install required packages:
# sudo apt-get install build-essential g++
# sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev
# sudo apt-get install libgtk2.0-dev libc6-dev
# sudo apt-get install python2.7-dev
# sudo apt-get install libblas-dev liblapack-dev gfortran
# sudo apt-get install libpng-dev
# sudo apt-get install subversion
# sudo apt-get install mercurial meld
# sudo apt-get install python-setuptools
# sudo apt-get install dpkg-dev fakeroot lintian
- CentOS 6.4
Update system:
# yum update
Install required packages:
# yum groupinstall "Development Tools"
# yum install libXext-devel blas-devel lapack-devel
# yum install gstreamer*
yum install gtk2-devel
1) Python 2.7 (only on CentOS as Ubuntu comes with v2.7.3)
(depends on development environment)
On CentOS:
# sudo yum install wget zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
On Ubuntu:
# sudo apt-get install wget libreadline-gplv2-dev libncurses5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
# sudo apt-get build-dep python2.7 python-gdbm python-bsddb3
# wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.bz2
# tar xf Python-2.7.6.tar.bz2
# cd Python-2.7.6
# ./configure --prefix=/usr/local
# make
# sudo make altinstall
export PATH=/usr/local/python274/bin:$PATH
Download and install distribute for Python 2.7
# wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz
# tar xf distribute-0.6.35.tar.gz
# cd distribute-0.6.35
# python2.7 setup.py build
# sudo python2.7 setup.py install
--
2) pyserial
# python2.7 setup.py build
# sudo python2.7 setup.py install
3) QT
(depends on development environment)
Download and extract sources
PATCH 1 (not needed anymore for 4.8.5):
to avoid the"-fuse-ld=gold' error
remove the lines:
linux-g++ {
... -fuse-ld=gold
}
from src/3rdparty/webkit/Source/common.pri
PATCH 2 (not needed anymore for >4.8.5; fix for the Gtk theme issue on some platforms: "QGtkStyle was unable to detect the current GTK+ theme."):
(see https://qt.gitorious.org/qt/qt/commit/a9dc50330acee2ac and https://bugzilla.redhat.com/show_bug.cgi?id=702493)
src/gui/styles/qgtkstyle_p.cpp Line 510-513
--
if (themeName.isEmpty()) {
qWarning("QGtkStyle was unable to detect the current GTK+ theme.");
return;
} else if (themeName == QLS("Qt") || themeName == QLS("Qt4")) {
--
=>
--
if (themeName == QLS("Qt") || themeName == QLS("Qt4")) {
--
# ./configure -opensource -confirm-license -release -nomake tests -nomake examples -nomake demos -gtkstyle
# make -j3
# sudo make install
Add path to your environment (eg. .bashrc)
PATH=/usr/local/Trolltech/Qt-4.8.6/bin:usr/local/Trolltech/Qt-4.8.6/lib:$PATH
export PATH
test correct path
# which qmake
# qmake -v
4) SIP
ENSURE THAT THE QT PATH IS SET CORRECTLY (see under 3)
# python2.7 configure.py
# make
# sudo make install
5) PyQT
ENSURE THAT THE QT PATH IS SET CORRECTLY (see under 3)
# python2.7 configure.py
# make
# sudo make install
to avoid error: /usr/lib/python2.7/dist-packages/PyQt4/plugins/imageformats: No such file or directory
# sudo ln -s /usr/local/Trolltech/Qt-4.8.5/plugins /usr/local/lib/python2.7/site-packages/PyQt4
on Ubuntu with the system Python 2.7.3:
# sudo ln -s /usr/local/Trolltech/Qt-4.8.5/plugins /usr/lib/python2.7/dist-packages/PyQt4
6) numpy
# python2.7 setup.py build
# sudo python2.7 setup.py install
7) scipy
(depends on blas, lapack and gfortran)
# python2.7 setup.py build
# sudo python2.7 setup.py install
8) matplotlib
(depends on libpng)
# python2.7 setup.py build
# sudo python2.7 setup.py install
to minimize binary builds remove test and sample data
# sudo rm -rf /usr/local/lib/python2.7/site-packages/matplotlib/mpl-data/sample_data
# sudo rm -rf /usr/local/lib/python2.7/site-packages/matplotlib/tests
# sudo rm -rf /usr/local/lib/python2.7/site-packages/matplotlib/testing
NOTE: replace site-packages by dist-packages if using the default Ubuntu python 2.7
9) MinimalModbus
# python2.7 setup.py build
# sudo python2.7 setup.py install
10) Install pyemf (only Python 2; fails on Python 3)
# python setup.py build
# sudo python setup.py install
11) patchelf
# ./configure
# make
# sudo make install
12) bbfreeze
# vi bbfrezze/recipes.py
comment out the line refering to matplotlib.numerix
(as this generates an error on build)
# python2.7 setup.py build
# sudo python2.7 setup.py install
On compile error, install the underlying bbfreeze-loader
wget http://pypi.python.org/packages/source/b/bbfreeze-loader/bbfreeze-loader-1.1.0.zip
on error copy the failing gcc line and add "-ldl -lutil" at the very end of the failing compile command (after the last object file)
13) alien
# sudo apt-get install alien
or download the src package
# git clone git://git.kitenet.net/alien
# su
# perl Makefile.PL; make; make install
14) pymodbus 1.3.0 (from master)
download from https://github.com/bashwork/pymodbus
# cd pymodbus
# python setup.py build
# sudo python setup.py install
15) yoctopuce 1.10.17849
download from https://pypi.python.org/pypi/yoctopuce/1.10.16490
# cd yoctopuce-1.10.17849
# python2.7 setup.py build
# sudo python2.7 setup.py install
copy shared libs
# sudo mkdir /usr/local/lib/python2.7/site-packages/yoctopuce/cdll
# sudo cp yoctopuce/cdll/* /usr/local/lib/python2.7/site-packages/yoctopuce/cdll
16) requests 2.3.0
https://github.com/kennethreitz/requests/releases
# python setup.py build
# sudo python setup.py install
17) gevent-1.0.1
https://pypi.python.org/pypi/gevent
# python setup.py build
# sudo python setup.py install
18) bottle 0.12.7
https://github.com/defnull/bottle/releases
# python setup.py build
# sudo python setup.py install
19) gevent-websocket-0.9.3
https://pypi.python.org/pypi/gevent-websocket/
# python setup.py build
# sudo python setup.py install
====
Alternate Installation via apt-get on Ubuntu (receiving outdated packages)
o pyserial (??)
# apt-get install python-serial
o SIP/PyQT (SIP 4.13.3 7& PyQT 4.9.3)
# apt-get install python-sip
# apt-get install python-qt4
o numpy (1.6.2)
# apt-get install python-numpy
o scipy (0.10.1)
# apt-get install python-scipy
o matplotlib (1.1.1)
# apt-get install python-matplotlib
o minimalmodbus (??)
# apt-get install python-pip
# pip install -U minimalmodbus
o bbfreeze (??)
# sudo easy_install bbfreeze