solaris python setuptools install
Question: I have a solaris host:

    
    
    SunOS blah 5.10 Generic_147441-27 i86pc i386 i86pc
    

and I have python at `/usr/bin/python`

    
    
    $ /usr/bin/python
    Python 2.6.4 (r264:75706, Jun 26 2012, 21:27:36) [C] on sunos5
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    

the problem is that I do not appear to have setuptools installed, so I
download the tarball and try:

    
    
    setuptools-0.6c12dev-r88846$ /usr/bin/python setup.py install
    Traceback (most recent call last):
      File "setup.py", line 4, in <module>
        from distutils.util import convert_path
    ImportError: No module named distutils.util
    

and of course, because I don't have distutils, I can't install... well
anything.

I'm not familiar with solaris at all; some googling indicated that I need
python-dev installed. how do I do that? any other suggestions?


Answer: You can use Python from OpenCSW. There you'll get a Python package and many
modules, including setuptools. Available Python versions are Python 2.6
(`CSWpython`), 2.7 (`CSWpython27`) and 3.3 (`CSWpython33`). Most module
packages are available for Python 2.6 and 2.7. Assuming you've [got started
with OpenCSW](http://www.opencsw.org/manual/for-administrators/getting-
started.html) and added `/opt/csw/bin` to `PATH`, you can:

    
    
    sudo pkgutil -y -i python py_django
    

To get modules for Python 3.3, can use virtualenv and pip as a regular user.
For example:

    
    
    sudo pkgutil -y -i python33 virtualenv
    virtualenv -p /opt/csw/bin/python3.3 py3env
    source py3env/bin/activate
    pip install django
    

