← Back to team overview

oship-dev team mailing list archive

Re: Mac install attempt - part 3

 

Hi, Roger:
No problem. I'll edit faq/391 to include a "Mac" section. Just another thing: please have a look at http://www.saltycrane.com/blog/2007/01/how-to-install-easy-install-for-python/ . Shouldn't we replace this:
<<
On Ubuntu and maybe other Debian flavors you may need to issue these two commands first:

sudo apt-get install python-dev
sudo apt-get install build-essential

in order to get all the required headers and libs.

Assuming that you have installed easy_install according to these
instructions: http://peak.telecommunity.com/DevCenter/EasyInstall

and assuming you have installed virtualenv (easy_install virtualenv)
and the version control system bazaar (sudo apt-get install bzr)

sudo easy_install virtualenv
>>
 ... by this:
<<
On Ubuntu and maybe other Debian flavors you may need to issue these two commands first:

sudo apt-get install python-setuptools python-dev build-essential # if you do not have the "easy_install" utility sudo apt-get install bzr # if you do not have the version control system "bazaar"

sudo easy_install virtualenv
>>
... as well? I also noted (but not tested) that, starting from Ubuntu Intrepid (8.10; I'm still on 8.04 LTS "Hardy", myself), there is also a "python-virtualenv" package (http://packages.ubuntu.com/intrepid/python-virtualenv) that should take care of all the "easy_install" dependencies for us. In this case, the text would become even simpler:
<<
On Ubuntu and maybe other Debian flavors you may need to issue these two commands first:

sudo apt-get install python-virtualenv # if you do not have the "virtualenv" utility sudo apt-get install bzr # if you do not have the version control system "bazaar"
>>
 What do you think?
Roberto.

Roger Erens a écrit :
Excellent news, Roberto. Can you put this into a new FAQ?

Cheers,

Roger

on 17-6-2009 18:01 Roberto Siqueira wrote:
Hi all,
  Many things happened since my last message:

- I subscribed to the ADC (Apple Developer Connection) to update my Xcode from 1.1 (the DVD version) to 1.5 (the last MacOSX 10.3 "Panther" compatible version);

- I installed the "Panther" version of Fink, just to discover that 2.4 is the last Python available for it;

- I experimented with two "very" alternative ways: (1) dual booting Ubuntu & OSX (http://chamblandes.tuxfamily.org/installationMac/preparatifs1.html for PowerPC, https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation for MacIntel) and (2) running Ubuntu-i386 inside OSX, using an emulator (http://trac.kju-app.org/wiki/UbuntuEdgyEft) [both work fine -- only the emulator is somewhat slow, depending on your machine];

- I found the MacPorts project (http://www.macports.org/index.php), that works exactly like Fink/apt-get but is much more up-to-date, at least for my 10.3.9 "Panther" system -- it contains not only Python 2.5 (& 2.6, 3.0, 3.1) but also setuptools, bzr, virtualenv etc;

- I borrowed a PowerBook laptop with MacOSX 10.4.11 "Tiger" to carry out some install tests on a "newer" system [MacPorts works well on both];

- I found, at last, that we don't need to reboot to update the PATH variable -- it's enough to relaunch the "Terminal" application :-).

Concerning the Apple Developer Connection: it's possible to subscribe to the ADC for free here: http://developer.apple.com/products/membership.html . Once subscribed, all versions of Xcode can then be downloaded from: https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/promo -> Downloads -> Developer Tools. I am giving these details here because (1) MacPorts depends on Xcode to work and (2) a up-to-date Xcode is useful to any "serious" Mac developer, as it comes with the latest GNU gcc, X11 SDK etc.

But the important point is that, by just following the MacPorts install instructions: http://guide.macports.org/ (and using my brand new ADC subscription, when asked), I ended up with everything necessary to proceed. And that's what I did. Regardless whether my MacOSX comes with Python 2.5 pre-installed or not, MacPorts' python25 must be installed because it is an independent version (confined to the /opt/local directory) that is fully compatible with those other packages (setuptools etc) that OSHIP will need later. But now this is a no-brainer. Just type (on a "Terminal"):

sudo port install python25

... to install it. Be warned that this process involves compilation and therefore takes some time (at least on my system). Next step is:

sudo port install python_select
sudo python_select python25

 ... to make the 2.5 version the "default" one. Then just:

sudo port install py25-virtualenv

... as this installs "py25-setuptools" automatically, as a dependency. Next:

sudo port install bzr

... that, in its turn, installs a lot of dependencies (pyrex etc) and takes some time to complete, as well. Last step is:

virtualenv-2.5 --no-site-packages oshipenv

Please note that it's "virtualenv-2.5", and not simply "virtualenv". Anyway, now it's possible to continue straight from OSHIP's faq/391: "cd oshipenv" etc etc. Everything works as expected then.

 To put it simple: MacPorts is the way to go. Cheers,
Roberto.





Follow ups

References