ImportError: cannot import name aliases
I just installed the Python 2.7.1 on Windows Vista using installer from official site, and get such error when run python.exe
C:\Python27>python.exe
Traceback (most recent call last):
File "C:\Python27\Lib\site.py", line 553, in <module>
main()
File "C:\Python27\Lib\site.py", line 542, in main
aliasmbcs()
Fil开发者_如何学JAVAe "C:\Python27\Lib\site.py", line 467, in aliasmbcs
import locale, codecs
File "C:\Python27\Lib\locale.py", line 15, in <module>
import encodings
File "C:\Python27\Lib\encodings\__init__.py", line 32, in <module>
from encodings import aliases
ImportError: cannot import name aliases
With Python 3.1.3, also just installed
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File "C:\Python31\lib\encodings\__init__.py", line 32, in <module>
ImportError: cannot import name aliases
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
What is going on? Should I configure PYTHONPATH or some thing like this? If so, what values should it have?
The only reference I could find points to a virus problem:
Starts here: http://mail.python.org/pipermail/tutor/2009-January/066730.html Goes through: http://mail.python.org/pipermail/tutor/2009-January/066739.html And ends: http://mail.python.org/pipermail/tutor/2009-January/066750.html
If your \Lib\encodings\aliases.py
is missing and you cannot create a file with that name there, start looking for the trojan.
精彩评论