platform.machine(): ImportError: No module named select

Ned Deily nad at acm.org
Wed Apr 15 16:10:50 EDT 2009


In article 
<a6b648e70904151125u5d458002tcd251ccf5e7fabb4 at mail.gmail.com>,
 "Ali H. Caliskan" <ali.h.caliskan at gmail.com> wrote:
> I'm trying to use "platform.machine()" function, but it doesn't work on
> python 3.0.1. Am I doing something wrong here or is it suppose to not work
> on py3k? The errors I get while using the python interpreter:
> 
> >>> import platform
> >>> platform.machine()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/opt/lib/python3.0/platform.py", line 1222, in machine
>     return uname()[4]
>   File "/opt/lib/python3.0/platform.py", line 1152, in uname
>     processor = _syscmd_uname('-p','')
>   File "/opt/lib/python3.0/platform.py", line 905, in _syscmd_uname
>     f = os.popen('uname %s 2> /dev/null' % option)
>   File "/opt/lib/python3.0/os.py", line 629, in popen
>     import subprocess, io
>   File "/opt/lib/python3.0/subprocess.py", line 361, in <module>
>     import select
> ImportError: No module named select

It should work.  The select module should be there; if not, the Python 
build/installation is probably faulty.  From the path names, I'll guess 
this is on Solaris.  If so, there seems to be a long history of problems 
building select and friends.  See, for example:
<http://mail.python.org/pipermail/python-list/2007-June/617030.html>

Someone with current Solaris experience may be able to help.

-- 
 Ned Deily,
 nad at acm.org




More information about the Python-list mailing list