永发信息网

python安装setuptool出错,报unicode不能转码

答案:2  悬赏:20  手机版
解决时间 2021-01-29 09:13
  • 提问者网友:战魂
  • 2021-01-28 21:35
我是照着教程做的,电脑64为,python2.7.6,但是安装后easy_install无法正常运行
报错如下

from setuptools.extension import Extension
File "E:\python\lib\site-packages\setuptools\extension.py", line 5, in >
from setuptools.dist import _get_unpatched
File "E:\python\lib\site-packages\setuptools\dist.py", line 15, in
from setuptools.compat import numeric_types, basestring
File "E:\python\lib\site-packages\setuptools\compat.py", line 19, in
from SimpleHTTPServer import SimpleHTTPRequestHandler
File "E:\python\lib\SimpleHTTPServer.py", line 27, in
class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
File "E:\python\lib\SimpleHTTPServer.py", line 208, in SimpleHTTPRequestHandle
r
mimetypes.init() # try to read system mime.types
File "E:\python\lib\mimetypes.py", line 358, in init
db.read_windows_registry()
File "E:\python\lib\mimetypes.py", line 258, in read_windows_registry
for subkeyname in enum_types(hkcr):
File "E:\python\lib\mimetypes.py", line 249, in enum_types
ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb8 in position 10: ordinal
not in range(128)
最佳答案
  • 五星知识达人网友:孤独的牧羊人
  • 2021-01-28 22:22
从官网下载msi格式安装包,运行就可以了。没用到easy_install什么的啊。
全部回答
  • 1楼网友:空山清雨
  • 2021-01-28 22:45
$wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-12.0.3.tar.gz#md5=f07e4b0f4c1c9368fcd980d888b29a65 2. 安装 $ tar -zxvf setuptools-12.0.3.tar.gz $ cd setuptools=12.0.3 $ python setup.py install 3. 出现错误提示: installed /usr/local/python2.7.3/lib/python2.7/site-packages/supervisor-4.0.0_dev-py2.7.egg processing dependencies for supervisor==4.0.0-dev searching for meld3>=1.0.0 reading https://pypi.python.org/simple/meld3/ download error on https://pypi.python.org/simple/meld3/: [errno 1] _ssl.c:504: error:14090086:ssl routines:ssl3_get_server_certificate:certificate verify failed -- some packages may not be found! couldn't find index page for 'meld3' (maybe misspelled?) scanning index of all packages (this may take a while) reading https://pypi.python.org/simple/ download error on https://pypi.python.org/simple/: [errno 1] _ssl.c:504: error:14090086:ssl routines:ssl3_get_server_certificate:certificate verify failed -- some packages may not be found! no local packages or download links found for meld3>=1.0.0 error: could not find suitable distribution for requirement.parse('meld3>=1.0.0')
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯