我正在尝试在pyCharm中安装carla包。我得到这个错误:
Collecting carla
Using cached carla-0.9.5.tar.gz (3.9 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/g7/zcxwx2kd1271sjr_g1z45lqw0000gn/T/pip-install-2o7825mv/carla_f852b9e62105468aa17c77b2df74f144/setup.py", line 114, in <module>
ext_modules=get_libcarla_extensions(),
File "/private/var/folders/g7/zcxwx2kd1271sjr_g1z45lqw0000gn/T/pip-install-2o7825mv/carla_f852b9e62105468aa17c77b2df74f144/setup.py", line 31, in get_libcarla_extensions
linux_distro = platform.dist()[0] # pylint: disable=W1505
AttributeError: module 'platform' has no attribute 'dist'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
我不知道是什么问题。我有最新的oio,wheel和setuptool(23.1.2,0.40.0,67.7.2)
我有macOS吗?是这个问题吗我可以做些什么来找到错误的来源?
1条答案
按热度按时间7cwmlq891#
问题是,carla没有macOS的whl文件和0.9.5是最新的版本与源附加到它.它碰巧与你的python版本不兼容,因为
setup.py
包含的代码在python〉=3.8中不起作用,请参阅这里。正如Klaus D.在评论中提到的,您应该尝试安装更新的版本。你必须从Github安装。下载https://github.com/carla-simulator/carla/tree/master/PythonAPI/carla,然后运行