[csw-users] python broken?

Ben Walton bwalton at opencsw.org
Sun Oct 7 14:03:16 CEST 2012


Hi Gerard,

On Sun, Oct 7, 2012 at 7:58 AM, Gerard Henry <ghenry at cmi.univ-mrs.fr> wrote:

> anyway, md5 seems to be here:
> t2000 # /opt/csw/bin/python
> Python 2.6.8 (unknown, Sep 20 2012, 17:14:14) [C] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import md5
> __main__:1: DeprecationWarning: the md5 module is deprecated; use hashlib
> instead
>>>>
>
> my guess is that something is wrong in python, because it does:
>
> Installing setuptools......
>   Complete output from command /donnees/virtualenv/my_new_env/bin/python -c
> "#!python
> \"\"\"Bootstra...sys.argv[1:])

Notice the hashbang there.  Is it finding CSW's python, the virtualenv
python or the system python?  If it's finding the system python,
that's likely the problem.  Is /opt/csw/bin leading your path?  Above
you called ggrep without qualification so /opt/csw/bin is likely in
your path but then you called /opt/csw/bin/python so maybe it doesn't
have precedence over the system path's?

> First, i don't understand why it needs to install setuptools since it's
> here:
> t2000 # pkginfo  CSWpysetuptools
> application CSWpysetuptools pysetuptools - Distribution Utiltiies for Python

The documentation says that it does this intentionally.  It's likely
to help with things like the built-in pip that it also adds?

>
> if i try to install setuptools manually and follow the "virtual" way:
> t2000 # /opt/csw/bin/python virtual-python.py -v
> Creating /root/lib/python2.6
>
> Traceback (most recent call last):
>   File "virtual-python.py", line 122, in <module>
>     main()
>   File "virtual-python.py", line 86, in main
>     for fn in os.listdir(stdlib_dir):
> OSError: [Errno 2] No such file or directory: '/opt/csw/lib/python2.6'
>
> is it normal that this lib doesn't exist?

This would depend on which packages you have installed, I think.  It
exists on the buildfarm boxes because we have CSWpydes installed, but
it's possible that it wouldn't be on your box...I wouldn't symlink it
though, I'd just create the tree, or better, install something that
delivers it for you like CSWpydes.  This _may_ be something that
should be addressed in the python package but I don't know for sure.

Hope this helps.  Once we know about your PATH settings things might
be clearer so we can provide better analysis.

Thanks
-Ben


More information about the users mailing list