Error in running python -v on Mac ox 10.5.

S

silverburgh

Hi,

I run 'python -v' on Macos 10.5 but I get this error :
# can't create /System/Library/Frameworks/Python.framework/Versions/
2.5/lib/python2.5/encodings/utf_8.pyc

Can you please tell me how to fix it?

And why I am seeing a lot of 'install' message' when i run 'python -
v'? I don't think I see that many
install message on linux.

Here is the full message. Thanks for any help.

$ python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site.pyc matches /System/Library/Frameworks/Python.framework/
Versions/2.5/lib/python2.5/site.py
import site # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/site.pyc
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/os.pyc matches /System/Library/Frameworks/Python.framework/
Versions/2.5/lib/python2.5/os.py
import os # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/os.pyc
import posix # builtin
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/posixpath.pyc matches /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/posixpath.py
import posixpath # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/posixpath.pyc
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/stat.pyc matches /System/Library/Frameworks/Python.framework/
Versions/2.5/lib/python2.5/stat.py
import stat # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/stat.pyc
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/UserDict.pyc matches /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/UserDict.py
import UserDict # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/UserDict.pyc
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/copy_reg.pyc matches /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/copy_reg.py
import copy_reg # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/copy_reg.pyc
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/types.pyc matches /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/types.py
import types # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/types.pyc
import _types # builtin
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/warnings.pyc matches /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/warnings.py
import warnings # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/warnings.pyc
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/linecache.pyc matches /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/linecache.py
import linecache # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/linecache.pyc
import encodings # directory /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/encodings
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/encodings/__init__.pyc matches /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/encodings/__init__.py
import encodings # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/encodings/__init__.pyc
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/codecs.pyc matches /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/codecs.py
import codecs # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/codecs.pyc
import _codecs # builtin
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/encodings/aliases.pyc matches /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/encodings/aliases.py
import encodings.aliases # precompiled from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/encodings/aliases.pyc
# /System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/encodings/utf_8.pyc has bad mtime
import encodings.utf_8 # from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/encodings/utf_8.py
# can't create /System/Library/Frameworks/Python.framework/Versions/
2.5/lib/python2.5/encodings/utf_8.pyc
Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /System/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/lib-dynload/readline.so
 
P

Piet van Oostrum

silverburgh said:
s> I run 'python -v' on Macos 10.5 but I get this error :
s> # can't create /System/Library/Frameworks/Python.framework/Versions/
s> 2.5/lib/python2.5/encodings/utf_8.pyc
s> Can you please tell me how to fix it?

This looks like the utf_8.py file has not been compiled in the
installation. Looks like a (not serious) bug to me.

Probably sudo python -v would solve it (even without -v, but it will
tell you that it wrote the .pyc file).
s> And why I am seeing a lot of 'install' message' when i run 'python -
s> v'? I don't think I see that many
s> install message on linux.

I don't see 'install' messages in the included text.
s> Here is the full message. Thanks for any help.
[deleted]
 
D

Diez B. Roggisch

silverburgh said:
Hi,

I run 'python -v' on Macos 10.5 but I get this error :
# can't create /System/Library/Frameworks/Python.framework/Versions/
2.5/lib/python2.5/encodings/utf_8.pyc

Can you please tell me how to fix it?

This looks like a rights-problem to me, and a missing pyc-file.

If you do

sudo python -v

does it work? Then, utf_8.pyc might have been created, and subsequent
sudo-less inovcations might work.

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top