-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-egenix-mx-base-on-virtualenv.html
286 lines (248 loc) · 11.9 KB
/
setup-egenix-mx-base-on-virtualenv.html
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
<!DOCTYPE html>
<!--[if IE 8 ]><html class="ie ie8" lang="ru"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="ru">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="author" content="Косолапов Дмитрий">
<meta name="google-site-verification" content="yJ35ns77j5pUPUutyBdAd5CwjqK3TGn5prTlyf2LlSo">
<title>Косолапов Дмитрий: мысли умные и не только. - Установка egenix-mx-base под virtualenv</title>
<link href="https://dicos.ru/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Косолапов Дмитрий: мысли умные и не только. Full Atom Feed" />
<link href="https://dicos.ru/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Косолапов Дмитрий: мысли умные и не только. Full RSS Feed" />
<!-- CSS -->
<link rel="stylesheet" href="https://dicos.ru/theme/css/style.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="https://dicos.ru/theme/css/colors/blue.css" id="colors">
<!-- Code highlight color scheme -->
<link href="https://dicos.ru/theme/css/code_blocks/darkly.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<meta property="og:locale" content="">
<meta property="og:site_name" content="Косолапов Дмитрий: мысли умные и не только.">
<meta property="og:type" content="article">
<meta property="article:author" content="">
<meta property="og:url" content="https://dicos.ru/setup-egenix-mx-base-on-virtualenv.html">
<meta property="og:title" content="Установка egenix-mx-base под virtualenv">
<meta property="og:description" content="">
<meta property="og:image" content="https://dicos.ru/images/guilherme-toti.jpg">
<meta property="article:published_time" content="2011-06-22 14:28:00+07:00">
</head>
<body>
<header id="header">
<!-- Container -->
<div class="container">
<!-- Logo / Mobile Menu -->
<div class="nine.columns columns">
<div id="logo">
<h1><a href="https://dicos.ru/">Косолапов Дмитрий: мысли умные и не только.</a></h1>
</div>
</div>
<!-- Navigation
================================================== -->
<div class="seven columns">
<nav id="navigation" class="menu">
<ul id="responsive">
<li><a href="https://dicos.ru/">Главная</a></li>
<li><a href="https://dicos.ru/about.html">Обо мне</a></li>
</ul>
</nav>
</div>
</div>
<!-- Container / End -->
</header>
<!-- Header / End -->
<div id="content-wrapper">
<section id="titlebar">
<!-- Container -->
<div class="container">
<div class="sixteen columns">
<nav id="breadcrumbs">
<ul>
<li>Текущее нахождение:</li>
<li><a href="https://dicos.ru/">Главная</a></li>
<li><a href="https://dicos.ru/category/python.html">python</a></li>
<li>Установка egenix-mx-base под virtualenv</li>
</ul>
</nav>
</div>
</div>
<!-- Container / End -->
</section>
<div class="container">
<div class="twelve alt columns">
<article class="post" style="margin: 0; border: 0;">
<section class="post-content">
<header class="meta">
<h2><a href="https://dicos.ru/setup-egenix-mx-base-on-virtualenv.html">Установка egenix-mx-base под virtualenv</a></h2>
<ul>
<li>By <a href="https://dicos.ru/author/admin.html">admin</a></li>
<li>Ср 22 Июнь 2011</li>
</ul>
</header>
<p>Несколько человек, в том числе и я столкнулись с проблемой, когда из-под
виртуальной среды невозможно установить модуль egenix-mx-base.</p>
<p>Установка через pip оканчивалась неудачей:</p>
<blockquote>
<div class="line-block">
<div class="line">pip install egenix-mx-base</div>
<div class="line">Downloading/unpacking egenix-mx-base</div>
<div class="line">Downloading egenix-mx-base-3.2.0.tar.gz (4.6Mb): 4.6Mb downloaded</div>
<div class="line">Running setup.py egg_info for package egenix-mx-base</div>
<div class="line">Installing collected packages: egenix-mx-base</div>
<div class="line">Running setup.py install for egenix-mx-base</div>
<div class="line">error: None</div>
<div class="line">Complete output from command /home/dmitry/web/openerp/bin/python
-c "import setuptools;
__file__='/home/dmitry/web/openerp/build/egenix-mx-base/setup.py';
execfile('/home/dmitry/web/openerp/build/egenix-mx-base/setup.py')"
install --single-version-externally-managed --record
/tmp/pip-NueJAA-record/install-record.txt --install-headers
/home/dmitry/web/openerp/include/site/python2.7:</div>
<div class="line">running install</div>
<div class="line">running build</div>
<div class="line">running mx_autoconf</div>
<div class="line">error: None</div>
<div class="line">----------------------------------------</div>
<div class="line">Command /home/dmitry/web/openerp/bin/python -c "import setuptools;
__file__='/home/dmitry/web/openerp/build/egenix-mx-base/setup.py';
execfile('/home/dmitry/web/openerp/build/egenix-mx-base/setup.py')"
install --single-version-externally-managed --record
/tmp/pip-NueJAA-record/install-record.txt --install-headers
/home/dmitry/web/openerp/include/site/python2.7 failed with error
code 1</div>
<div class="line">Storing complete log in /home/dmitry/.pip/pip.log</div>
</div>
</blockquote>
<p>Установка при помощи easy_install давала примерно похожий результат:</p>
<blockquote>
<div class="line-block">
<div class="line">easy_install egenix-mx-base</div>
<div class="line">Searching for egenix-mx-base</div>
<div class="line">Reading <a class="reference external" href="http://pypi.python.org/simple/egenix-mx-base/">http://pypi.python.org/simple/egenix-mx-base/</a></div>
<div class="line">Reading <a class="reference external" href="http://www.lemburg.com/python/mxExtensions.html">http://www.lemburg.com/python/mxExtensions.html</a></div>
<div class="line">Reading <a class="reference external" href="http://www.egenix.com/products/python/mxBase/">http://www.egenix.com/products/python/mxBase/</a></div>
<div class="line">Reading <a class="reference external" href="http://www.egenix.com/">http://www.egenix.com/</a></div>
<div class="line">Best match: egenix-mx-base 3.2.0</div>
<div class="line">Downloading
<a class="reference external" href="http://downloads.egenix.com/python/egenix-mx-base-3.2.0.tar.gz">http://downloads.egenix.com/python/egenix-mx-base-3.2.0.tar.gz</a></div>
<div class="line">Processing egenix-mx-base-3.2.0.tar.gz</div>
<div class="line">Running egenix-mx-base-3.2.0/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-gyJnYN/egenix-mx-base-3.2.0/egg-dist-tmp-ZbsIvy</div>
<div class="line">Warning: Can't read registry to find the necessary compiler
setting</div>
<div class="line">Make sure that Python modules _winreg, win32api or win32con are
installed.</div>
<div class="line">error: Setup script exited with error: None</div>
</div>
</blockquote>
<p>Попытка сборки из исходников так же оканчивалась неудачей:</p>
<blockquote>
<div class="line-block">
<div class="line">egenix-mx-base-3.2.0$ python setup.py install</div>
<div class="line">running install</div>
<div class="line">running build</div>
<div class="line">running mx_autoconf</div>
<div class="line">error: None</div>
</div>
</blockquote>
<div class="section" id="id1">
<h2>Решение:</h2>
<p>Благо на сайте разработчика сказано о том, что можно установить наш
модуль без C компилятора. Но для этого сперва надо знать в какой
кодировке скомпилирован питон: UTF-16 (UCS-2) или UTF-32 (UCS-4). Узнать
это можно так:</p>
<blockquote>
<div class="line-block">
<div class="line">$ python #запускаем питон</div>
<div class="line">>>> import sys</div>
<div class="line">>>> print sys.maxunicode</div>
</div>
</blockquote>
<p>Если число равно 65535, то кодировка UTF-16 (UCS2), если 4294967295, то
UTF-32 (UCS4).</p>
<div class="line-block">
<div class="line">Для UTF-16 строка установки будет такая:</div>
<div class="line">easy_install -i <a class="reference external" href="http://downloads.egenix.com/python/index/ucs2/">http://downloads.egenix.com/python/index/ucs2/</a>
egenix-mx-base</div>
</div>
<div class="line-block">
<div class="line">А для UTF-32 строка установки будет выглядеть так:</div>
<div class="line">easy_install -i <a class="reference external" href="http://downloads.egenix.com/python/index/ucs4/">http://downloads.egenix.com/python/index/ucs4/</a>
egenix-mx-base</div>
</div>
<p>Сайт разработчика: <a class="reference external" href="http://www.egenix.com/products/python/mxBase/">http://www.egenix.com/products/python/mxBase/</a></p>
</div>
<div class="sharing">
</div>
<hr>
</section>
<div class="clearfix"></div>
</article>
</div>
<!-- Sidebar -->
<div class="four columns">
</div>
</div>
<!-- Container / End -->
</div>
<!-- Content Wrapper / End -->
<div id="footer-bottom">
<!-- Container -->
<div class="container">
<div class="eight columns">Blog powered by <a href="http://getpelican.com">Pelican</a></div>
<div class="eight columns">
<ul class="social-icons-footer">
<li>
<a href="#" class="tooltip top" title="You can add links in your config file">
<i class="icon-you can add links in your config file"></i>
</a>
</li>
<li>
<a href="#" class="tooltip top" title="Another social link">
<i class="icon-another social link"></i>
</a>
</li>
<li><a href="https://dicos.ru/feeds/all.atom.xml" class="tooltip top" title="RSS"><i class="icon-rss"></i></a></li>
</ul>
</div>
</div>
<!-- Container / End -->
</div>
<!-- Footer Bottom / End -->
<!-- Javascripts -->
<script src="https://dicos.ru/theme/js/jquery.min.js"></script>
<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter14462131 = new Ya.Metrika({
id:14462131,
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true
});
} catch(e) { }
});
var n = d.getElementsByTagName("script")[0],
s = d.createElement("script"),
f = function () { n.parentNode.insertBefore(s, n); };
s.type = "text/javascript";
s.async = true;
s.src = "https://mc.yandex.ru/metrika/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/14462131" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter --> </body>
</html>