首页 > 解决方案 > 如何解决 vs code stdio 上与 pylint installltion 相关的错误

问题描述

C:\Users\home\Desktop\projectF\Voice-Based-Email-For-ThenBlind- 
master>C:/Python34/python.exe -m
pip install -U pylint --user
Downloading/unpacking pylint 
Downloading/unpacking isort>=4.2.5,<5 (from pylint)
Downloading/unpacking astroid>=2.3.0,<2.4 (from pylint)
Cleaning up...
Exception:
Traceback (most recent call last):
  File "C:\Python34\lib\site- 
  packages\pip\_vendor\pkg_resources.py", line 2421, in _dep_map
    return self.__dep_map
  File "C:\Python34\lib\site- 

packages\pip_vendor\pkg_resources.py",第 2283 行,在getattr中 引发 AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception 
occurred:

Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\pip\basecommand.py", line 
122, in main
status = self.run(options, args)
  File "C:\Python34\lib\site-packages\pip\commands\install.py", 
line 278, in run
    requirement_set.prepare_files(finder, 
force_root_egg_info=self.bundle, bundle=self.bundle)
  File "C:\Python34\lib\site-packages\pip\req.py", line 1265, in 
prepare_files
    req_to_install.extras):
  File "C:\Python34\lib\site- 
packages\pip\_vendor\pkg_resources.py", line 2232, in requires
    dm = self._dep_map
  File "C:\Python34\lib\site- 

packages\pip_vendor\pkg_resources.py”,第 2423 行,在 _dep_map self.__dep_map = self._compute_dependencies() 文件“C:\Python34\lib\site-packages\pip_vendor\pkg_resources.py”,第 2447 行,在 _compute_dependencies 中解析= next(parse_requirements(distvers)) 文件“C:\Python34\lib\site-packages\pip_vendor\pkg_resources.py”,第 2544 行,在 parse_requirements 行,p,specs = scan_list(VERSION,LINE_END,line,p, ( 1,2),"版本规范") 文件“C:\Python34\lib\site-packages\pip_vendor\pkg_resources.py”,第 2522 行,在 scan_list “预期的 ',' 或列表末尾”,行,"at",line[p:] ValueError: ("预期 ',' 或列表末尾", 'lazy-object-proxy ==1.4. ','在',' ')

将调试日志存储在 C:\Users\home\pip\pip.log 中

标签: python-3.x

解决方案


当我尝试安装 pylint 时,我在 Ubuntu 14.04 VM 上遇到了同样的问题。出现错误提示“UserWarning: Unknown distribution option”,这表明我的 setuptools 的版本可能太旧了。但是更新并没有解决问题。所以我尝试从项目页面lazy-object-proxy.1.4.3 zip文件下载源文件 下载zip文件后,简单地通过zip文件安装解决了我的问题:

pip install PATH_TO_THE_ZIP_FILE

推荐阅读