gpt4 book ai didi

python - 导入错误 : cannot import name aliases

转载 作者:可可西里 更新时间:2023-11-01 11:38:58 24 4
gpt4 key购买 nike

我刚刚使用来自 official site 的安装程序在 Windows Vista 上安装了 Python 2.7.1。 , 运行 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()
File "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

使用 Python 3.1.3,也刚刚安装

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.

这是怎么回事?我应该配置 PYTHONPATH 还是类似的东西?如果是这样,它应该具有什么值?

最佳答案

我能找到的唯一指向病毒问题的引用:

从这里开始:http://mail.python.org/pipermail/tutor/2009-January/066730.html通过:http://mail.python.org/pipermail/tutor/2009-January/066739.html并结束:http://mail.python.org/pipermail/tutor/2009-January/066750.html

如果您的 \Lib\encodings\aliases.py 丢失并且您无法在那里创建具有该名称的文件,请开始寻找木马。

关于python - 导入错误 : cannot import name aliases,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4707030/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com