1、问题:clang找不到
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main" sudo apt-get update sudo apt-get install build-essential clang-10 lld-10 g++-7 cmake ninja-build libvulkan1 python python-dev python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-10/bin/clang++ 180 && sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-10/bin/clang 180
2、问题:缺少依赖
pip install --user setuptools && pip3 install --user -Iv setuptools==47.3.1 && pip install --user distro && pip3 install --user distro && pip install --user wheel && pip3 install --user wheel auditwheel==4.0.0
3、问题:克隆失败
添加ssh密钥后使用下面指令
添加ssh密钥:
ssh-keygen -t ed25519 -C "your_email@example.com"
cat ~/.ssh/id_ed25519.pub
克隆:
git clone --depth 1 -b carla git@github.com:CarlaUnreal/UnrealEngine.git ~/UnrealEngine_4.26
4、问题:找不到c++11
事实证明,到2024/10/21,Ubuntu 22.04用户遵循官方指南仍然必须回顾这个问题并使用sudo apt install g++-12
, 也许添加一行教程将有所帮助, 节省 30 分钟的时间。
5、问题:make clean失败
在buildcarlaue4.sh下面的131行修改成
cd ../../Plugins
6、问题:蓝图冲突
尝试:重新git carla
git clone -b ue4-dev https://github.com/carla-simulator/carla
tar -xvzf <assets_file_name>.tar.gz.tar -C /path/to/carla/Unreal/CarlaUE4/Content/Carla
7、找不到渲染设备
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
8、rgb错误
pip卸载carla,然后安装编译后的carla
pip3 install --user PythonAPI/carla/dist/carla-0.9.15-py3.8-linux-x86_64.whl
9、
export UE4_ROOT=~/UnrealEngine_4.26
10.WIN11 carla
. : 无法加载文件 D:\Backup\Documents\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 ht
tps:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 3
+ . 'D:\Backup\Documents\WindowsPowerShell\profile.ps1'
Set-ExecutionPolicy -Scope LocalMachine RemoteSigned
powershell -Command "Set-ExecutionPolicy RemoteSigned -Scope LocalMachine -Force"
这个是有效的:
powershell -NoProfile -ExecutionPolicy Bypass -Command "& { make PythonAPI }"
powershell -NoProfile -ExecutionPolicy Bypass -Command "& { make PythonAPI }"
set-executionpolicy remotesigned
11、win10 安装zlib1.2.13
12、问题:zlib错误
CMAKE 版本问题,选3.16
13、问题:
Turn off this advice by setting config variable advice.detachedHead to false
-[install_rpclib]: Creating "D:\ycf\carla\Build\rpclib-src\build\"
-[install_rpclib]: Generating build...
CMake Error: Could not create named generator Visual Studio 17 2022
解决:回退git版本到2019
14、依赖问题:linux
base) pc@pc-8488:~$ conda activate carla_build
(carla_build) pc@pc-8488:~$ conda env export
name: carla_build
channels:
- defaults
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=5.1=1_gnu
- ca-certificates=2025.2.25=h06a4308_0
- ld_impl_linux-64=2.40=h12ee557_0
- libffi=3.4.4=h6a678d5_1
- libgcc-ng=11.2.0=h1234567_1
- libgomp=11.2.0=h1234567_1
- libstdcxx-ng=11.2.0=h1234567_1
- ncurses=6.4=h6a678d5_0
- openssl=3.0.16=h5eee18b_0
- python=3.8.20=he870216_0
- readline=8.2=h5eee18b_0
- setuptools=75.1.0=py38h06a4308_0
- sqlite=3.45.3=h5eee18b_0
- tk=8.6.14=h39e8969_0
- wheel=0.44.0=py38h06a4308_0
- xz=5.6.4=h5eee18b_1
- zlib=1.2.13=h5eee18b_1
- pip:
- absl-py==2.2.2
- cachetools==5.5.2
- carla==0.9.15
- certifi==2025.1.31
- charset-normalizer==3.4.1
- cloudpickle==3.1.1
- contourpy==1.1.1
- cycler==0.12.1
- farama-notifications==0.0.4
- filelock==3.16.1
- fonttools==4.57.0
- fsspec==2025.3.0
- google-auth==2.39.0
- google-auth-oauthlib==1.0.0
- grpcio==1.70.0
- gym==0.21.0
- gymnasium==0.28.1
- idna==3.10
- imageio==2.35.1
- importlib-metadata==8.5.0
- importlib-resources==6.4.5
- jax-jumpy==1.0.0
- jinja2==3.1.6
- kiwisolver==1.4.7
- lazy-loader==0.4
- markdown==3.7
- markdown-it-py==3.0.0
- markupsafe==2.1.5
- matplotlib==3.7.5
- mdurl==0.1.2
- meson==1.7.2
- mpmath==1.3.0
- networkx==3.1
- numpy==1.23.5
- nvidia-cublas-cu12==12.1.3.1
- nvidia-cuda-cupti-cu12==12.1.105
- nvidia-cuda-nvrtc-cu12==12.1.105
- nvidia-cuda-runtime-cu12==12.1.105
- nvidia-cudnn-cu12==9.1.0.70
- nvidia-cufft-cu12==11.0.2.54
- nvidia-curand-cu12==10.3.2.106
- nvidia-cusolver-cu12==11.4.5.107
- nvidia-cusparse-cu12==12.1.0.106
- nvidia-nccl-cu12==2.20.5
- nvidia-nvjitlink-cu12==12.8.93
- nvidia-nvtx-cu12==12.1.105
- oauthlib==3.2.2
- packaging==25.0
- pandas==2.0.3
- pillow==10.4.0
- pip==22.3.1
- protobuf==5.29.4
- pyasn1==0.6.1
- pyasn1-modules==0.4.2
- pygame==2.6.1
- pygments==2.19.1
- pyparsing==3.1.4
- python-dateutil==2.9.0.post0
- pytz==2025.2
- pywavelets==1.4.1
- requests==2.32.3
- requests-oauthlib==2.0.0
- rich==13.9.4
- rsa==4.9.1
- scikit-image==0.21.0
- scipy==1.10.1
- shapely==2.0.7
- six==1.17.0
- stable-baselines3==2.0.0a1
- sympy==1.13.3
- tensorboard==2.14.0
- tensorboard-data-server==0.7.2
- tifffile==2023.7.10
- torch==2.4.1
- tqdm==4.67.1
- triton==3.0.0
- typing-extensions==4.13.2
- tzdata==2025.2
- urllib3==2.2.3
- werkzeug==3.0.6
- zipp==3.20.2
prefix: /home/pc/anaconda3/envs/carla_build
pip install scikit-image
15、问题:找不到gym_carla
(carla_new) D:\software\anaconda\envs\carla_new\Lib\site-packages\RMCarla\gym_carla_23\src\V3-2LaneV0\rmdqn>python test.py
Traceback (most recent call last):
File "test.py", line 10, in <module>
from gym_carla.envs import carla_env_v3 as carla_env
ModuleNotFoundError: No module named 'gym_carla'
(carla_new) D:\software\anaconda\envs\carla_new\Lib\site-packages\RMCarla\gym_carla_23\src\V3-2LaneV0\rmdqn>set PYTHONPATH=D:\software\anaconda\envs\carla_new\Lib\site-packages\RMCarla
16、执行一个make import时是打开文件
import: server
@echo "进入import"
@pause
# @"${CARLA_BUILD_TOOLS_FOLDER}/Import.py" $(ARGS)
@python "${CARLA_BUILD_TOOLS_FOLDER}/Import.py" $(ARGS)
@echo "离开import"
@pause