solaris python安装工具安装

solaris python安装工具安装,python,solaris,setuptools,distutils,Python,Solaris,Setuptools,Distutils,我有一台solaris主机: SunOS blah 5.10 Generic_147441-27 i86pc i386 i86pc 我在/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. >>>

我有一台solaris主机:

SunOS blah 5.10 Generic_147441-27 i86pc i386 i86pc
我在
/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.
>>>
问题是我似乎没有安装setuptools,因此我下载tarball并尝试:

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
setuptools-0.6c12dev-r88846$/usr/bin/python setup.py安装
回溯(最近一次呼叫最后一次):
文件“setup.py”,第4行,在
从distutils.util导入转换路径
ImportError:没有名为distutils.util的模块
当然,因为我没有distutils,所以无法安装。。。什么都可以


我对solaris一点也不熟悉;谷歌搜索表明我需要安装pythondev。我该怎么做?还有其他建议吗?

您可以从OpenCSW使用Python。在那里,您将获得一个Python包和许多模块,包括setuptools。可用的Python版本有Python 2.6(
CSWpython
)、2.7(
CSWpython27
)和3.3(
CSWpython33
)。大多数模块包都适用于Python2.6和2.7。假设您已经将
/opt/csw/bin
添加到
路径
,您可以:

sudo pkgutil -y -i python py_django
要获取Python3.3的模块,可以作为普通用户使用virtualenv和pip。例如:

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