如何解决 AttributeError: ‘version_info’ 对象没有属性 ‘__version__’

huangapple go评论62阅读模式
英文:

How to resolve AttributeError: 'version_info' object has no attribute '__version__'

问题

以下是要翻译的内容:

我试图将自动驾驶汽车的控制器的Python文件连接到Carla模拟器。我猜我所做的可能并不是那么必要。但是当我尝试调用Python文件时,它显示如下。

这些是模拟器的要求。除了Pillow和Scipy之外,我可以降级其他依赖项的版本。但是Pillow和Scipy的版本较新。然而,我仍然遇到错误,似乎版本不是问题。请帮助我。
英文:
C:\Coursera\CarlaSimulator\PythonClient\Course1FinalProject>python module_7.py
Traceback (most recent call last):
  File "module_7.py", line 26, in <module>
    import matplotlib.pyplot as plt
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\__init__.py", line 131, in <module>
    from matplotlib.rcsetup import defaultParams, validate_backend, cycler
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\rcsetup.py", line 29, in <module>
    from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\fontconfig_pattern.py", line 22, in <module>
    from pyparsing import (Literal, ZeroOrMore, Optional, Regex, StringEnd,
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\pyparsing\__init__.py", line 130, in <module>
    __version__ = __version_info__.__version__
AttributeError: 'version_info' object has no attribute '__version__'

I was trying to connect the python file for controller of an autonomous car to Carlasimulator. I guess what I am doing is not that necessary. However when I try to call the python file it show like this.

Pillow>=3.1.2
numpy>=1.14.5
protobuf>=3.6.0
pygame>=1.9.4
matplotlib>=2.2.2
future>=0.16.0
scipy>=0.17.0

These are the requierments for the simulator. Other than Pillow and Scipy I could downgrade the versions of other dependencies. But the version of Pillow and Scipy are newer. However I am still getting the error, seems like the versions are not the problem.
Please help me

答案1

得分: 1

我可以运行该文件,只需安装较旧版本的matplotlib。我在这个领域是个新手,但我猜这与Carla和matplotlib版本的兼容性有关。当我安装matplotlib 2.2.4时,一切都运行正常。希望这对您有用。

英文:

I could run the file just installing older version of matplotlib. I am a beginner in this field, but I guess it's with the compatibility of Carla and version of matplotlib. when I installed matplotlib 2.2.4 everything works fine. hope this would be useful.

huangapple
  • 本文由 发表于 2023年5月14日 18:59:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/76247111.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定