$pip show rqalpha
Exception:
Traceback (most recent call last):
File "D:\Anaconda3\envs\rqalpha\lib\site-packages\pip\_internal\basecommand.py", line 141, in main
status = self.run(options, args)
File "D:\Anaconda3\envs\rqalpha\lib\site-packages\pip\_internal\commands\show.py", line 47, in run
results, list_files=options.files, verbose=options.verbose):
File "D:\Anaconda3\envs\rqalpha\lib\site-packages\pip\_internal\commands\show.py", line 130, in print_results
for i, dist in enumerate(distributions):
File "D:\Anaconda3\envs\rqalpha\lib\site-packages\pip\_internal\commands\show.py", line 77, in search_packages_info
lines = dist.get_metadata_lines('RECORD')
File "D:\Anaconda3\envs\rqalpha\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1409, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "D:\Anaconda3\envs\rqalpha\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1405, in get_metadata
raise e
File "D:\Anaconda3\envs\rqalpha\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1402, in get_metadata
return value.decode('utf-8') if six.PY3 else value
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 39880: invalid start byte
RQAlpha的版本: 3.1.1 Python的版本:3.6.6 pip 版本:18.0 系统版本Window10-64位
安装后 pip show 或者pip uninstall rqalpha 出现:
可能导致的问题,之后的版本升级可能由于卸载之前版本失败而导致升级事务失败。
原因大概是windows上文件路径用的gbk编码,pip show和uninstall中间有一步会去读出rqalpha-3.1.1.dist-info中的一个RECORD文件(里面放了所有module相关文件的路径)然后尝试用"utf-8"解码,然后上传到pypi的时候dist-info文件夹下有文件路径中有中文(mac下打包好拷到windows下上传pypi的?),导致编码不一致。大概换台机器重新打包传一次pypi就好了 附: rqalpha-3.1.1.dist-info/RECORD 467行