Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43848

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ribonucleico@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'anyway.': 0.05; 'importing': 0.05; 'subject:Python': 0.06; 'odd': 0.07; 'paths': 0.07; 'skip:` 10': 0.07; 'statically': 0.07; 'subject:installation': 0.07; 'tkinter': 0.07; 'failed:': 0.09; 'permissions': 0.09; 'setup.py': 0.09; 'skip:/ 10': 0.09; 'skip:b 70': 0.09; 'variant': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'gui': 0.12; 'thread': 0.14; '-o2': 0.16; 'cc:name:python list': 0.16; 'compute': 0.16; 'luck,': 0.16; 'renaming': 0.16; 'run:': 0.16; 'skip:b 80': 0.16; 'skip:t 110': 0.16; 'subject: \n ': 0.16; 'sudo': 0.16; 'uploading': 0.16; 'for?': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; 'library': 0.18; 'app': 0.19; 'ticket': 0.19; 'basically': 0.19; 'thu,': 0.19; '8bit%:5': 0.22; 'machine': 0.22; '>>>': 0.22; 'cc:addr:gmail.com': 0.22; 'email addr:gmail.com&gt;': 0.22; 'tests': 0.22; 'cc:addr:python.org': 0.22; 'install': 0.23; 'cc:2**1': 0.23; 'error': 0.23; 'compilation': 0.24; 'skip': 0.24; 'skip:l 30': 0.24; 'skip:\xa0 20': 0.24; 'login': 0.25; 'options': 0.25; 'extension': 0.26; 'certain': 0.27; 'header:In-Reply-To:1': 0.27; 'specifically': 0.29; '(this': 0.29; 'am,': 0.29; '8bit%:3': 0.30; 'said,': 0.30; 'specified': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'faster,': 0.31; 'file:': 0.31; 'gcc': 0.31; 'loading': 0.31; 'requesting': 0.31; 'file': 0.32; 'there.': 0.32; 'probably': 0.32; 'skip:- 30': 0.32; 'run': 0.32; 'quite': 0.32; 'open': 0.33; 'linux': 0.33; 'running': 0.33; 'skip:b 30': 0.33; 'updated': 0.34; 'problem': 0.35; 'subject: (': 0.35; 'info': 0.35; 'skip:- 50': 0.35; 'problem.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'building': 0.35; 'there': 0.35; 'really': 0.36; '(e.g.,': 0.36; 'installing': 0.36; 'doing': 0.36; 'thanks': 0.36; 'similar': 0.36; 'should': 0.36; 'skip:- 20': 0.37; 'level': 0.37; 'architecture': 0.38; '8bit%:4': 0.38; 'hat': 0.38; 'jason': 0.38; 'machines': 0.38; 'files': 0.38; 'skip:- 10': 0.38; 'pm,': 0.38; 'rather': 0.38; 'anything': 0.39; 'skip:& 20': 0.39; 'received:74.125': 0.39; 'though,': 0.39; 'either': 0.39; 'easy': 0.60; 'most': 0.60; 'identify': 0.61; 'staff': 0.61; 'such': 0.63; 'afraid': 0.65; 'finally': 0.65; 'to:addr:gmail.com': 0.65; 'export': 0.74; 'you:': 0.81; './configure': 0.84; 'answer:': 0.84; 'hassle': 0.84; 'skip:/ 30': 0.84; 'understand,': 0.84; 'was:': 0.91; '\xa0there': 0.91; '***': 0.95; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=FD3wvhgDaetHyupH87HmN4SkydqQVoNvBkgxaMxlfj8=; b=Few3RcMCSrLDzdr1FvTyOfGnxiinbofITIuPLi/RBxk7hDJ3jGhq4nN+rZMxmY1pL1 5F6/p/Xb4Syj/EQtYnxRApLF3FwR1EBlpG/+61vcFLOMPKeTRwXRedwg9vPyIRe06lCh Pq/OEnNJS+sHKxJixHLDb8AMWiLUQrYbf/nNofC5+Kln3CNo0KSrZ/9aa7J4Eih7Zzf0 /oYsXrD00H287gWX3S0UwI6xzcUcjqe5UnyDqUjPAyYVn8P1Hcmv9maWdkWsHBBpHwbE p/zmbHubyepiG7BArX7IQ33CgC+952bKhxPc64V1zTT2maARYLiEbuiLkvlBM8EQDERF qR/w==
MIME-Version 1.0
X-Received by 10.15.43.73 with SMTP id w49mr32861416eev.12.1366308577031; Thu, 18 Apr 2013 11:09:37 -0700 (PDT)
In-Reply-To <CAD4ivxW73n5=gRTxMLwDQvdM2M5pSSf55zuFBO6CvOZ7FCaMwA@mail.gmail.com>
References <1366122614066-5014440.post@n6.nabble.com> <kkjvqq$18g$1@ger.gmane.org> <CAD4ivxXCe_ZZrrhT5v6Eqkoo_opx2Mx=FsU0qm6z4-ZQuXLRyQ@mail.gmail.com> <CAD4ivxXeif4-hXq_oRDDrJijwt41oeJB_=tBRfcAKDpQJnrweA@mail.gmail.com> <CAPTjJmqDb-90z7fSEq0gWErK-jP-ShAoRdztWerWa=6mf3Moeg@mail.gmail.com> <CAD4ivxUVsMvb5wD9N4JGkcgdzW8CoSQP=LkaNCzYk6qo0+i0zg@mail.gmail.com> <CAEk9e3ruAnwL927mmRNm86Kccgamtnm7KbTW=+PqZ8by76+McA@mail.gmail.com> <CAD4ivxW73n5=gRTxMLwDQvdM2M5pSSf55zuFBO6CvOZ7FCaMwA@mail.gmail.com>
Date Thu, 18 Apr 2013 14:09:36 -0400
Subject Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights)
From James Jong <ribonucleico@gmail.com>
To Jason Swails <jason.swails@gmail.com>
Content-Type multipart/alternative; boundary=089e016813106358c404daa68196
Cc python list <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.785.1366308578.3114.python-list@python.org> (permalink)
Lines 319
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1366308578 news.xs4all.nl 2255 [2001:888:2000:d::a6]:59611
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43848

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

All

I finally solved the problem. The problem was that setup.py tests loading
the dynamic library libtk (this I don't understand, since I though Python
would statically link against TCL, TK and SQLITE.

Either way, I have updated the thread at StackOverflow with the answer:
http://stackoverflow.com/questions/16026348/preparing-tkinter-and-sqlite3-for-python-installation-no-admin-rights/16090051#16090051

but basically the answer was:

Add the following include paths through `CPPFLAGS`

* /path_to/sqlite3/include
* /path_to/tcl/include
* /path_to/tk/include

the following lib paths through `LDFLAGS`

* /path_to/sqlite3/lib
* /path_to/tcl/lib
* /path_to/tk/lib

and the following lib paths through `LD_LIBRARY_PATH`:

* /path_to/sqlite/lib
* /path_to/tcl/lib
* /path_to/tk/lib

Thanks,

James


On Thu, Apr 18, 2013 at 12:24 PM, James Jong <ribonucleico@gmail.com> wrote:

> Thanks Jason. I have pinpointed the location of the error to a very
> specific gcc line. I am reproducing the error below (very easy to read):
>
> I run:
>
> ==================================================================
> export CPPFLAGS='-I/opt/sqlite-3.7.16.2/include -I/opt/tk8.6.0/include
>  -I/opt/tcl8.6.0/include/'
>
> export LDFLAGS='-L/opt/sqlite-3.7.16.2/lib -L/opt/tk8.6.0/lib/
>  -L/opt/tcl8.6.0/lib/  ./configure --prefix=/path_to_python-2.7.4
> --enable-shared
> ==================================================================
>
> and then I run make and I got  the following:
>
> ==================================================================
> ....
> building '_tkinter' extension
>
> gcc -pthread -fPIC -fno-strict-aliasing
> -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DWITH_APPINIT=1
> -I/usr/X11/include -I. -IInclude -I./Include
> -I/opt/sqlite/sqlite-3.7.16.2/include -I/opt/tk8.6.0/include
> -I/opt/tcl8.6.0/include -I/usr/local/include
> -I/opt/python/src/Python-2.7.4/Include -I/opt/python/src/Python-2.7.4 -c
> /opt/python/src/Python-2.7.4/Modules/_tkinter.c -o
> build/temp.linux-x86_64-2.7/opt/python/src/Python-2.7.4/Modules/_tkinter.o
>
> gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3
> -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -I/usr/X11/include -I.
> -IInclude -I./Include -I/opt/sqlite/sqlite-3.7.16.2/include
> -I/opt/tk8.6.0/include -I/opt/tcl8.6.0/include -I/usr/local/include
> -I/opt/python/src/Python-2.7.4/Include -I/opt/python/src/Python-2.7.4 -c
> /opt/python/src/Python-2.7.4/Modules/tkappinit.c -o
> build/temp.linux-x86_64-2.7/opt/python/src/Python-2.7.4/Modules/tkappinit.o
>
> gcc -pthread -shared -L/opt/sqlite/sqlite-3.7.16.2/lib
> -L/opt/tk8.6.0/lib/ -L/opt/tcl8.6.0/lib/ -L/opt/sqlite/sqlite-3.7.16.2/lib
> -L/opt/tk8.6.0/lib/ -L/opt/tcl8.6.0/lib/ -I. -IInclude -I./Include
> -I/opt/sqlite/sqlite-3.7.16.2/include -I/opt/tk8.6.0/include
> -I/opt/tcl8.6.0/include
> build/temp.linux-x86_64-2.7/opt/python/src/Python-2.7.4/Modules/_tkinter.o
> build/temp.linux-x86_64-2.7/opt/python/src/Python-2.7.4/Modules/tkappinit.o
> -L/usr/X11/lib -L/opt/sqlite/sqlite-3.7.16.2/lib -L/opt/tk8.6.0/lib/
> -L/opt/tcl8.6.0/lib/ -L/usr/local/lib -L. -ltk8.6 -ltcl8.6 -lX11
> -lpython2.7 -o build/lib.linux-x86_64-2.7/_tkinter.so
>
> *** WARNING: renaming "_tkinter" since importing it failed: libtk8.6.so:
> cannot open shared object file: No such file or directory
> ...
> ==================================================================
>
> The odd thing is that I can see `libtk8.6.so` under /opt/tcl8.6.0/lib,
>  as I specified with `LDFLAGS`:
>
> ==================================================================
> cd /opt/tcl8.6.0/lib
> ls
> .
> ../
> pkgconfig
> tk8.6
> libtkstub8.6.a
> tkConfig.sh
> libtk8.6.so
> ==================================================================
>
> The file libtk8.6.so  has 1.5M and is definitely there.
>
> So why did that compilation fail?
>
> James
>
>
>
> On Thu, Apr 18, 2013 at 11:05 AM, Jason Swails <jason.swails@gmail.com>wrote:
>
>>
>>
>>
>> On Thu, Apr 18, 2013 at 10:37 AM, James Jong <ribonucleico@gmail.com>wrote:
>>
>>> Thanks so much Chris. This is part of a super computer and I am afraid I
>>> don't have access to a machine with sudo permissions and similar
>>> architecture & OS.
>>>
>>> Is there any way to active higher level of verbosity during the build
>>> process to identify what is failing? Or anything specifically I should
>>> watch for?
>>>
>>
>> Most supercomputers I'm familiar with have some variant of Linux running
>> (e.g., SUSE or Red Hat are quite common).  Some of these machines only have
>> barebone kernels on the compute nodes, though, and have a fully-fledged
>> Linux OS only on the login nodes... This info is typically on the website
>> for that supercomputer (if it has one), or any other available
>> documentation.
>>
>> That said, there are other options available that are probably less of a
>> hassle for you:
>>
>> 1) Skip tkinter unless you _know_ you really need it.  Do you plan on
>> doing X-forwarding when you log in?  Can you run the GUI app on your local
>> machine before uploading the files you need for computation?  Running GUIs
>> locally rather than over the network is typically much faster, anyway.
>>
>> 2) Submit a ticket to the supercomputer staff requesting that they
>> install the software you need.  There may be other 'gotchas' associated
>> with installing certain software on supercomputers that the staff would
>> know best.
>>
>> Good luck,
>> Jason
>>
>
>

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Preparing sqlite, dl and tkinter for Python installation (no admin rights) James Jong <ribonucleico@gmail.com> - 2013-04-18 14:09 -0400

csiph-web