在输入conda create -n tf2 python=3.6时报以下错误:
原文链接:https://blog.csdn.net/XD_Cauthy/article/details/94168746
File "E:anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 422, in <listcomp>
self._urls_data = [line.strip().decode(‘utf-8‘) for line in fh]
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xb1 in position 11: invalid start byte
发现是由于核心文件中package_cache_data.py的第422行采用utf-8解码方式无法解码0xb1的值,使用sublimetext或notepad打开文件,更改
self._urls_data = [line.strip().decode(‘utf-8‘) for line in fh]
为
self._urls_data = [line.strip().decode(‘cp936‘) for line in fh]
OSError: (10054, ‘WSAECONNRESET‘)
原因:网络问题
将命令修改为:conda create -n tf2 python=3.6 --offline
原文:https://www.cnblogs.com/Lee-yl/p/12548676.html