LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-07-2013, 08:00 PM   #1
dc_eros
Member
 
Registered: Nov 2006
Distribution: Slackware
Posts: 292

Rep: Reputation: 39
Install PIL on different version of Python


Currently at 13.37, python is 2.6.6 and also having an "altinstall" version of 2.7.3.

I wanted to install PIL from here: http://taper.alienbase.nl/mirrors/pe...imaging/build/

but it installs on 2.6.6. Maybe I could do a make altinstall as well but didn't tried it since the Slackbuild script have some magic going on (and it includes a patch as well) here: http://taper.alienbase.nl/mirrors/pe...ing.SlackBuild

Is there a way I can install PIL to python 2.7? Is there something like "installpkg pkg.txz altinstall" ?

TIA
 
Old 01-07-2013, 08:56 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,557

Rep: Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512
Changing the python version used at build time :
1) Unpack 'Imaging-1.1.7.tar.gz'
2) Edit line 1 in 'setup.py' from : #!/usr/bin/env python
.. to your python-2.7, like : #!/usr/bin/env python27

3) Repack the source to 'Imaging-1.1.7.tar.gz'.
 
1 members found this post helpful.
Old 01-07-2013, 09:16 PM   #3
dc_eros
Member
 
Registered: Nov 2006
Distribution: Slackware
Posts: 292

Original Poster
Rep: Reputation: 39
Just built a couple of minutes ago.

What I did is modify the slackbuild script to reference the full path of "/usr/local/bin/python2.7" instead of just "python".

Ex:

http://taper.alienbase.nl/mirrors/pe...ing.SlackBuild

From

Code:
PYTHONINC=$( python -c 'from distutils.sysconfig import *;print get_python_inc()' )
to

Code:
PYTHONINC=$( /usr/local/bin/python2.7 -c 'from distutils.sysconfig import *;print get_python_inc()' )
I've edited other lines as well to do the same.

Last edited by dc_eros; 01-07-2013 at 09:17 PM.
 
1 members found this post helpful.
  


Reply

Tags
pil, python


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
install .deb with lower version of python bencla Ubuntu 4 05-01-2012 01:13 PM
Use PIL in Python to simple composite images browny_amiga Programming 1 06-25-2010 08:57 AM
How can I uninstall a python package installed with python setup.py install? milomak Linux - Software 1 11-16-2009 09:22 PM
python problem - compiled from source - python -V still showing old version txm123 Linux - Newbie 1 02-15-2006 11:05 AM
install python 2.3 ,necssary to remove python 2.2 ngan_yine Linux - Newbie 7 12-28-2003 04:07 PM


All times are GMT -5. The time now is 09:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration