python-3.x - 如何解决 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 中
解决方案
当我尝试安装 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
推荐阅读
- python - 如何在 mypy 中定义隐含导入?
- c# - 如何使用 C# 从 JSON 中删除键值
- javascript - 为什么我的 localhost 链接中出现问号?https://localhost:3000/?
- java - Hibernate“mappedby”没有找到外键
- java - 如何在java中将文本写入文本文件中的下一个空行
- c++ - 使用 range-v3 将一个数字范围拆分为多个范围
- android - Android VectorDrawable 的缓存逻辑是如何工作的?
- python - 有没有办法在 Spotipy (Spotify Python Api) 中获取包含特定歌曲的播放列表列表
- docker - docker-compose - 如何提供凭据或 API 密钥以从私有存储库中提取图像?
- sql - 如果一列不为空,则转换为多列的行