MacOSx에서 port 이용하여 Python Django 설치

easy_install django
pip install django…
등도 사용가능하지만.. port만을 사용해서 설치하도록 한다.
다른것들도 다 port로 설치했으니까 일관성잇게

$ sudo port selfupdate
$ sudo port install python27
$ sudo port install py-django python27-django
$ sudo port install py-django-nose python27-django-nose
$ sudo port install py-django-extensions python27-django-extensions

확인하는 방법

>>> import django
>>> print django.get_version()

여기서 안된다 보통…. no module 어쩌고 에러 발생한다.

그러면 파이썬 기본 버전을 설정해준다.

port select --list python
which will show you something like this:

Available versions for python:
    python27 (active)
To tell Macports to use a specific version use:

port select --set python python27

이거 했는데도 안되네…urandom이 없다네…

sudo port install py27-*

….를 해버렸는데도 안되네…

sudo port install opencv


이건 좀 다른건데... opengl설치

Installing the basics (Python 2.7.2 and OpenGL)

Install macports using the instruction on the macports site (pick the Lion dmg package)
Install python opengl for python 2.7. This will automatically build Python 2.7.2 and all dependencies. It might take a while to compile…
$ sudo port install py27-opengl
Install PyOpenGL accelerate.
$ sudo port install py27-opengl-accelerate
Change the default python interpreter (Apple) to the one from Macports.
$ sudo port select python python27
Optional packages


$ sudo port install cairo
$ sudo port install py27-cairo

Leave a Reply

Your email address will not be published. Required fields are marked *

 characters available