banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành *nix Lỗi khi chạy "python -v".  XML
  [Question]   Lỗi khi chạy "python -v". 10/05/2009 06:47:43 (+0700) | #1 | 180099
HoS
Member

[Minus]    0    [Plus]
Joined: 03/02/2007 15:07:38
Messages: 43
Offline
[Profile] [PM]
Lúc đầu Python chạy ổn, không gặp lỗi gì. Sau khi mình vọc một số phần xem webcam trên Ubuntu 9.04 thì bây giờ gặp "lỗi" khi gõ lệnh python -v mặc dùng các chức năng khác thì bình thường. Mình đã search nhưng không tìm ra giải pháp nào khắc phục vấn đề này cả nên đành post lên đây nhờ các bạn giúp dùm.

Còn đây là thông điệp của nó:

Code:
username@linux-lappy:~$ python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.6/site.pyc matches /usr/lib/python2.6/site.py
import site # precompiled from /usr/lib/python2.6/site.pyc
# /usr/lib/python2.6/os.pyc matches /usr/lib/python2.6/os.py
import os # precompiled from /usr/lib/python2.6/os.pyc
import errno # builtin
import posix # builtin
# /usr/lib/python2.6/posixpath.pyc matches /usr/lib/python2.6/posixpath.p
import posixpath # precompiled from /usr/lib/python2.6/posixpath.pyc
# /usr/lib/python2.6/stat.pyc matches /usr/lib/python2.6/stat.py
import stat # precompiled from /usr/lib/python2.6/stat.pyc
# /usr/lib/python2.6/genericpath.pyc matches /usr/lib/python2.6/genericpath.py
import genericpath # precompiled from /usr/lib/python2.6/genericpath.pyc
# /usr/lib/python2.6/warnings.pyc matches /usr/lib/python2.6/warnings.py
import warnings # precompiled from /usr/lib/python2.6/warnings.pyc
# /usr/lib/python2.6/linecache.pyc matches /usr/lib/python2.6/linecache.py
import linecache # precompiled from /usr/lib/python2.6/linecache.pyc
# /usr/lib/python2.6/types.pyc matches /usr/lib/python2.6/types.py
import types # precompiled from /usr/lib/python2.6/types.pyc
# /usr/lib/python2.6/UserDict.pyc matches /usr/lib/python2.6/UserDict.py
import UserDict # precompiled from /usr/lib/python2.6/UserDict.pyc
# /usr/lib/python2.6/_abcoll.pyc matches /usr/lib/python2.6/_abcoll.py
import _abcoll # precompiled from /usr/lib/python2.6/_abcoll.pyc
# /usr/lib/python2.6/abc.pyc matches /usr/lib/python2.6/abc.py
import abc # precompiled from /usr/lib/python2.6/abc.pyc
# /usr/lib/python2.6/copy_reg.pyc matches /usr/lib/python2.6/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.6/copy_reg.pyc
# /usr/lib/python2.6/sitecustomize.pyc matches /usr/lib/python2.6/sitecustomize.py
import sitecustomize # precompiled from /usr/lib/python2.6/sitecustomize.pyc
# /usr/lib/python2.6/dist-packages/apport_python_hook.pyc matches /usr/lib/python2.6/dist-packages/apport_python_hook.py
import apport_python_hook # precompiled from /usr/lib/python2.6/dist-packages/apport_python_hook.pyc
import encodings # directory /usr/lib/python2.6/encodings
# /usr/lib/python2.6/encodings/__init__.pyc matches /usr/lib/python2.6/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.6/encodings/__init__.pyc
# /usr/lib/python2.6/codecs.pyc matches /usr/lib/python2.6/codecs.py
import codecs # precompiled from /usr/lib/python2.6/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.6/encodings/aliases.pyc matches /usr/lib/python2.6/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.6/encodings/aliases.pyc
# /usr/lib/python2.6/encodings/utf_8.pyc matches /usr/lib/python2.6/encodings/utf_8.py
import encodings.utf_8 # precompiled from /usr/lib/python2.6/encodings/utf_8.pyc
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib/python2.6/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /usr/lib/python2.6/lib-dynload/readline.so
>>>
[Up] [Print Copy]
  [Question]   Re: Lỗi khi chạy "python -v". 10/05/2009 06:59:16 (+0700) | #2 | 180101
[Avatar]
quanta
Moderator

Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
[Profile] [PM]
Bạn muốn dùng -v hay -V nhỉ?
Let's build on a great foundation!
[Up] [Print Copy]
  [Question]   Re: Lỗi khi chạy "python -v". 10/05/2009 07:04:44 (+0700) | #3 | 180102
HoS
Member

[Minus]    0    [Plus]
Joined: 03/02/2007 15:07:38
Messages: 43
Offline
[Profile] [PM]
hi, "python -v" không phải "python -V" smilie
[Up] [Print Copy]
  [Question]   Re: Lỗi khi chạy "python -v". 10/05/2009 09:13:21 (+0700) | #4 | 180110
mR.Bi
Member

[Minus]    0    [Plus]
Joined: 22/03/2006 13:17:49
Messages: 812
Offline
[Profile] [PM] [WWW]
thế thì lỗi gì?
Code:
-v     Print a message each time a module is initialized, showing the place (filename or built-in module) from which it is loaded.  When given twice, print a message for
              each file that is checked for when searching for a module.  Also provides information on module cleanup at exit.

nhầm thì nhận nhầm, có chết ai đâu nhở?
All of my life I have lived by a code and the code is simple: "honour your parent, love your woman and defend your children"
[Up] [Print Copy]
  [Question]   Re: Lỗi khi chạy "python -v". 10/05/2009 09:36:13 (+0700) | #5 | 180112
HoS
Member

[Minus]    0    [Plus]
Joined: 03/02/2007 15:07:38
Messages: 43
Offline
[Profile] [PM]
@mr Bi: Không nhầm! smilie
[Up] [Print Copy]
  [Question]   Re: Lỗi khi chạy "python -v". 10/05/2009 09:38:41 (+0700) | #6 | 180113
mR.Bi
Member

[Minus]    0    [Plus]
Joined: 22/03/2006 13:17:49
Messages: 812
Offline
[Profile] [PM] [WWW]
thế lỗi bồ muốn nói tới là cái gì?
All of my life I have lived by a code and the code is simple: "honour your parent, love your woman and defend your children"
[Up] [Print Copy]
  [Question]   Re: Lỗi khi chạy "python -v". 10/05/2009 11:16:32 (+0700) | #7 | 180124
HoS
Member

[Minus]    0    [Plus]
Joined: 03/02/2007 15:07:38
Messages: 43
Offline
[Profile] [PM]
@Mr Bi: Xin phép hỏi cậu này nhé
- Cậu có dùng linux bao giờ chưa?
- Có biết python -h làm cái gì không?

Nếu chưa biết những thứ này thì thôi đi, và cảm ơn cậu!



[Up] [Print Copy]
  [Question]   Re: Lỗi khi chạy "python -v". 10/05/2009 11:39:15 (+0700) | #8 | 180127
[Avatar]
K4i
Moderator

Joined: 18/04/2006 09:32:13
Messages: 635
Location: Underground
Offline
[Profile] [PM]

HoS wrote:
@Mr Bi: Xin phép hỏi cậu này nhé
- Cậu có dùng linux bao giờ chưa?
- Có biết python -h làm cái gì không?

Nếu chưa biết những thứ này thì thôi đi, và cảm ơn cậu!
 


Tôi đố cậu nhá. Đây là cái output của tôi khi chạy python -v

[debian5]$ python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.4/site.pyc matches /usr/lib/python2.4/site.py
import site # precompiled from /usr/lib/python2.4/site.pyc
# /usr/lib/python2.4/os.pyc matches /usr/lib/python2.4/os.py
import os # precompiled from /usr/lib/python2.4/os.pyc
import posix # builtin
# /usr/lib/python2.4/posixpath.pyc matches /usr/lib/python2.4/posixpath.py
import posixpath # precompiled from /usr/lib/python2.4/posixpath.pyc
# /usr/lib/python2.4/stat.pyc matches /usr/lib/python2.4/stat.py
import stat # precompiled from /usr/lib/python2.4/stat.pyc
# /usr/lib/python2.4/UserDict.pyc matches /usr/lib/python2.4/UserDict.py
import UserDict # precompiled from /usr/lib/python2.4/UserDict.pyc
# /usr/lib/python2.4/copy_reg.pyc matches /usr/lib/python2.4/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.4/copy_reg.pyc
# /usr/lib/python2.4/types.pyc matches /usr/lib/python2.4/types.py
import types # precompiled from /usr/lib/python2.4/types.pyc
import japanese # directory /usr/lib/python2.4/site-packages/japanese
# /usr/lib/python2.4/site-packages/japanese/__init__.pyc matches /usr/lib/python2.4/site-packages/japanese/__init__.py
import japanese # precompiled from /usr/lib/python2.4/site-packages/japanese/__init__.pyc
import japanese.aliases # directory /usr/lib/python2.4/site-packages/japanese/aliases
# /usr/lib/python2.4/site-packages/japanese/aliases/__init__.pyc matches /usr/lib/python2.4/site-packages/japanese/aliases/__init__.py
import japanese.aliases # precompiled from /usr/lib/python2.4/site-packages/japanese/aliases/__init__.pyc
import encodings # directory /usr/lib/python2.4/encodings
# /usr/lib/python2.4/encodings/__init__.pyc matches /usr/lib/python2.4/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.4/encodings/__init__.pyc
# /usr/lib/python2.4/codecs.pyc matches /usr/lib/python2.4/codecs.py
import codecs # precompiled from /usr/lib/python2.4/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.4/encodings/aliases.pyc matches /usr/lib/python2.4/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.4/encodings/aliases.pyc
# /usr/lib/python2.4/warnings.pyc matches /usr/lib/python2.4/warnings.py
import warnings # precompiled from /usr/lib/python2.4/warnings.pyc
# /usr/lib/python2.4/linecache.pyc matches /usr/lib/python2.4/linecache.py
import linecache # precompiled from /usr/lib/python2.4/linecache.pyc
# /usr/lib/python2.4/encodings/utf_8.pyc matches /usr/lib/python2.4/encodings/utf_8.py
import encodings.utf_8 # precompiled from /usr/lib/python2.4/encodings/utf_8.pyc
Python 2.4.3 (#1, May 24 2008, 13:47:28)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib/python2.4/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /usr/lib/python2.4/lib-dynload/readline.so 


Vậy hệ thống của tôi có bị lỗi ko vậy

PS: đọc kĩ output trước khi post bài, và nói với người khác cái giọng khó nghe như thế.

smilie
Sống là để không chết chứ không phải để trở thành anh hùng
[Up] [Print Copy]
  [Question]   Re: Lỗi khi chạy "python -v". 10/05/2009 11:43:56 (+0700) | #9 | 180128
mR.Bi
Member

[Minus]    0    [Plus]
Joined: 22/03/2006 13:17:49
Messages: 812
Offline
[Profile] [PM] [WWW]
à, bồ hỏi thì tôi trả lời:
- tôi dùng Linux bao lâu rồi chả nhớ, tôi không có thói quen đếm để đi khoe người khác
- tôi không thích -h, tôi dùng man chắc cũng được.

và bồ vẫn chưa trả lời câu hỏi của tôi, lỗi bồ muốn nói tới là cái gì?
python của tôi đây:

Code:
[Sat May 09 22:40:35] whatvn@osvn:~$ python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.6/site.pyc matches /usr/lib/python2.6/site.py
import site # precompiled from /usr/lib/python2.6/site.pyc
# /usr/lib/python2.6/os.pyc matches /usr/lib/python2.6/os.py
import os # precompiled from /usr/lib/python2.6/os.pyc
import errno # builtin
import posix # builtin
# /usr/lib/python2.6/posixpath.pyc matches /usr/lib/python2.6/posixpath.py
import posixpath # precompiled from /usr/lib/python2.6/posixpath.pyc
# /usr/lib/python2.6/stat.pyc matches /usr/lib/python2.6/stat.py
import stat # precompiled from /usr/lib/python2.6/stat.pyc
# /usr/lib/python2.6/genericpath.pyc matches /usr/lib/python2.6/genericpath.py
import genericpath # precompiled from /usr/lib/python2.6/genericpath.pyc
# /usr/lib/python2.6/warnings.pyc matches /usr/lib/python2.6/warnings.py
import warnings # precompiled from /usr/lib/python2.6/warnings.pyc
# /usr/lib/python2.6/linecache.pyc matches /usr/lib/python2.6/linecache.py
import linecache # precompiled from /usr/lib/python2.6/linecache.pyc
# /usr/lib/python2.6/types.pyc matches /usr/lib/python2.6/types.py
import types # precompiled from /usr/lib/python2.6/types.pyc
# /usr/lib/python2.6/UserDict.pyc matches /usr/lib/python2.6/UserDict.py
import UserDict # precompiled from /usr/lib/python2.6/UserDict.pyc
# /usr/lib/python2.6/_abcoll.pyc matches /usr/lib/python2.6/_abcoll.py
import _abcoll # precompiled from /usr/lib/python2.6/_abcoll.pyc
# /usr/lib/python2.6/abc.pyc matches /usr/lib/python2.6/abc.py
import abc # precompiled from /usr/lib/python2.6/abc.pyc
# /usr/lib/python2.6/copy_reg.pyc matches /usr/lib/python2.6/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.6/copy_reg.pyc
# /usr/lib/python2.6/sitecustomize.pyc matches /usr/lib/python2.6/sitecustomize.py
import sitecustomize # precompiled from /usr/lib/python2.6/sitecustomize.pyc
# /usr/lib/python2.6/dist-packages/apport_python_hook.pyc matches /usr/lib/python2.6/dist-packages/apport_python_hook.py
import apport_python_hook # precompiled from /usr/lib/python2.6/dist-packages/apport_python_hook.pyc
import encodings # directory /usr/lib/python2.6/encodings
# /usr/lib/python2.6/encodings/__init__.pyc matches /usr/lib/python2.6/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.6/encodings/__init__.pyc
# /usr/lib/python2.6/codecs.pyc matches /usr/lib/python2.6/codecs.py
import codecs # precompiled from /usr/lib/python2.6/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.6/encodings/aliases.pyc matches /usr/lib/python2.6/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.6/encodings/aliases.pyc
# /usr/lib/python2.6/encodings/utf_8.pyc matches /usr/lib/python2.6/encodings/utf_8.py
import encodings.utf_8 # precompiled from /usr/lib/python2.6/encodings/utf_8.pyc
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib/python2.6/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /usr/lib/python2.6/lib-dynload/readline.so
>>>

nhưng đây tôi không gọi là lỗi, mà nó thực hiện đúng với chức năng -v của nó, còn muốn biết option -v để làm gì thì bồ vui lòng đọc lại bài trả lời trước của tôi.


All of my life I have lived by a code and the code is simple: "honour your parent, love your woman and defend your children"
[Up] [Print Copy]
  [Question]   Re: Lỗi khi chạy "python -v". 10/05/2009 11:49:25 (+0700) | #10 | 180130
nbthanh
HVA Friend

Joined: 21/12/2001 14:51:51
Messages: 429
Offline
[Profile] [PM]
@HoS: bạn nhảm nhí vừa thôi! Tham số -v đã làm đúng chức năng của nó là in ra các thông số. Thế thì lỗi gì ở đây?
[Up] [Print Copy]
  [Question]   Re: Lỗi khi chạy "python -v". 10/05/2009 12:56:11 (+0700) | #11 | 180137
[Avatar]
secmask
Elite Member

[Minus]    0    [Plus]
Joined: 29/10/2004 13:52:24
Messages: 553
Location: graveyard
Offline
[Profile] [PM] [WWW]
nếu bạn HoS vẫn thấy chưa thỏa đáng thì thử xem lại bash history xem lúc trước đã gõ gì vào nào smilie
[Up] [Print Copy]
  [Question]   Re: Lỗi khi chạy "python -v". 10/05/2009 13:33:31 (+0700) | #12 | 180141
HoS
Member

[Minus]    0    [Plus]
Joined: 03/02/2007 15:07:38
Messages: 43
Offline
[Profile] [PM]
À ra là vậy. Xin lỗi mọi người nhé!
[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|