【发布时间】:2017-03-24 22:17:13
【问题描述】:
我正在尝试使用 pip 安装软件包,但得到以下错误输出。我知道 Python 3.x 中不再使用解码(我使用的是 3.6),并且不确定如何安装文件。
C:\Users\sgand>pip install housecanary
收集家金丝雀使用缓存的housecanary-0.6.5.tar.gz
命令 python setup.py egg_info 的完整输出:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\sgand\AppData\Local\Temp\pip-build-u0ymg1zl\housecanary\setup.py", line 22, in <module>
version=find_version('housecanary', '__init__.py'),
File "C:\Users\sgand\AppData\Local\Temp\pip-build-u0ymg1zl\housecanary\setup.py", line 13, in find_version
version_file = read(*file_paths)
File "C:\Users\sgand\AppData\Local\Temp\pip-build-u0ymg1zl\housecanary\setup.py", line 9, in read
return codecs.open(os.path.join(*parts), 'r').read().decode('UTF-8')
AttributeError: 'str' object has no attribute 'decode'
有什么想法吗?
【问题讨论】:
标签: python python-3.x pip