Open EchoYJJ opened 3 years ago
@EchoYJJ Thank you for the question. Are you able to post the full output of the make PythonAPI
command. It sometimes finishes with a success message even if it was not successful. Can you also confirm if you are running the commands in the x64 Native Tools command prompt?
@EchoYJJ Thank you for the question. Are you able to post the full output of the
make PythonAPI
command. It sometimes finishes with a success message even if it was not successful. Can you also confirm if you are running the commands in the x64 Native Tools command prompt?
Hi! @corkyw10 Glad to receive your reply. I'm sure I run the commands in the x64 Native Tools command prompt. And .egg file doesn't show up in PythonAPI\carla\dist. The whole output is very long, there exists a lot of "warning C4819" : 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失(This file contains characters that cannot be represented in the current code page (936).Please save this file as Unicode to prevent data loss) Also, errors contain a lot of "error LNK2001": 无法解析的外部符号 "public: virtual unsigned int __cdecl boost::python::objects::py_function_impl_base::max_arity(void)const " (?max_arity@py_function_impl_base@objects@python@boost@@UEBAIXZ)
For sake of the big scale of the full output, I put it in the txt below. full output.txt
By the way, I also try to run "make launch" anyway. This is my make launch output. make launch output.txt
It will open CarlaUE4, but nothing shows up. I check my D:\carla\Unreal\CarlaUE4\Content\Carla, only a gz. file exists.
Hi, It seems that the PowerShell command to extract the content .tar.gz has failed, because the file is so big. I suggest to install the 7zip.org application in the default folder and then the build system will use 7zip to extract the next time. In the mean time you can extract that file by hand.
About the unresolved external errors it seems you are using Python 3.8 instead the Python 3.7, or maybe you have more than one version. I suggest to run the make commands using the ARGS="--python-version=3.7" parameter to specify which version you want to use, otherwise it can be that the Boost library takes one version, and the CARLA build systems takes another version, and then we have mismatch.
Another thing to check is that you have installed the x64 version of Python and not the x32 version.
Regards
Hi @bernatx I do as you recommand, I download 7-Zip to "C:\Program Files (x86)\7-Zip". I don't know whether the position is right. Then, I run make PythonAPI ARGS="--python-version=3.7" in VS2017 x64 tool. However, the results seems to be no difference.
I also try to extract that file by hand, but it says "The File is corrupted". I notice the file is only 250KB, not so big like you say. Perhaps something went wrong with my tar file, do you know how to fix it?
Regards make PythonAPI output.txt
otherwise it can be that the Boost library takes one version, and the CARLA build systems takes another version, and then we have mismatch.
hi, i have the same problem, how to examine the version of boost version.
on@boost@@YA?AVobject@123@AEBV4123@AEBV?$handle@U_object@@@23@1@Z)
libcarla.obj : error LNK2001: 无法解析的外部符号 "class boost::python::api::object cdecl boost::python::api::getattr(class boost::python::api::object const &,char const *)" (?getattr@api@python@boost@@YA?AVobject@123@AEBV4123@PEBD@Z)
libcarla.obj : error LNK2001: 无法解析的外部符号 "class boost::python::api::object cdecl boost::python::api::operator<(class boost::python::api::object const &,class boost::python::api::object const &)" (??Mapi@python@boost@@YA?AVobject@012@AEBV3012@0@Z)
libcarla.obj : error LNK2001: 无法解析的外部符号 "void cdecl boost::python::api::setitem(class boost::python::api::object const &,class boost::python::api::object const &,class boost::python::api::object const &)" (?setitem@api@python@boost@@YAXAEBVobject@123@00@Z)
libcarla.obj : error LNK2001: 无法解析的外部符号 "class boost::python::api::object cdecl boost::python::api::operator==(class boost::python::api::object const &,class boost::python::api::object const &)" (??8api@python@boost@@YA?AVobject@012@AEBV3012@0@Z)
libcarla.obj : error LNK2001: 无法解析的外部符号 "public: cdecl boost::python::api::object::object(class boost::python::handle
Hi, You can check which version of python goes to this file:
carla\PythonAPI\carla\dependencies\lib\libboost_python37-vc141-mt-x64-1_72.lib
In this case the python37 is for Python 3.7 version.
Maybe that helps
Hi, You can check which version of python goes to this file:
carla\PythonAPI\carla\dependencies\lib\libboost_python37-vc141-mt-x64-1_72.lib
In this case the python37 is for Python 3.7 version. Maybe that helps
Hi @bernatx , there do exist that file, could you please tell me how to check it.
Hi, I tried the following steps and it works.
I hope it will help!
1. Remove all the other versions of Python. (I uninstall Anaconda and reinstall Python 3.7.9 from Python.org.)
@7788boy after removing conda and running the
update.bat
file I received the following error. Did you also receive it?Update.bat 20201222_232b876 http://carla-assets.s3.amazonaws.com/20201222_232b876.tar.gz Downloading "http://carla-assets.s3.amazonaws.com/20201222_232b876.tar.gz"... & : The term 'C:\Program Files\Anaconda3\Scripts\conda.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\AGV2FE\Documents\WindowsPowerShell\profile.ps1:4 char:4 + (& "C:\Program Files\Anaconda3\Scripts\conda.exe" "shell.powershell" ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\Program File...ripts\conda.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
1. Remove all the other versions of Python. (I uninstall Anaconda and reinstall Python 3.7.9 from Python.org.)
@7788boy after removing conda and running the
update.bat
file I received the following error. Did you also receive it?Update.bat 20201222_232b876 http://carla-assets.s3.amazonaws.com/20201222_232b876.tar.gz Downloading "http://carla-assets.s3.amazonaws.com/20201222_232b876.tar.gz"... & : The term 'C:\Program Files\Anaconda3\Scripts\conda.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\AGV2FE\Documents\WindowsPowerShell\profile.ps1:4 char:4 + (& "C:\Program Files\Anaconda3\Scripts\conda.exe" "shell.powershell" ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\Program File...ripts\conda.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
No, I didn't receive this. Do you modify the path variable of Python?
1. Remove all the other versions of Python. (I uninstall Anaconda and reinstall Python 3.7.9 from Python.org.)
@7788boy after removing conda and running the
update.bat
file I received the following error. Did you also receive it?Update.bat 20201222_232b876 http://carla-assets.s3.amazonaws.com/20201222_232b876.tar.gz Downloading "http://carla-assets.s3.amazonaws.com/20201222_232b876.tar.gz"... & : The term 'C:\Program Files\Anaconda3\Scripts\conda.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\AGV2FE\Documents\WindowsPowerShell\profile.ps1:4 char:4 + (& "C:\Program Files\Anaconda3\Scripts\conda.exe" "shell.powershell" ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\Program File...ripts\conda.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
No, I didn't receive this. Do you modify the path variable of Python?
Hi @7788boy, somehow I missed your reply. Currently, I have stopped using carla from source (using it from source is very inconsistent). I am just using the pre build version. If I build it again and face errors, I will post it here.
P.S: I was using the source version in order to use the new vehicle import in carla
I succeeded to solve this problem (windows built version 9.12 ). The problem was that I had more than one installed Python version. Even I set windows PATH environment variable to point only on Python 3.8.10 which I use in this project, it seems that somehow the build process use also another Python version I had (Python 3.9.6) and a conflict was happened which caused to the link errors.
I do the follow steps: (1) Uninstall all other versions of python (in my case Python 3.9.6 ) (2) Took care that my environment variable PATH contains only the relevant folders needed for the Python I use (in my case 3.8.10 ) (3) Deleted the build folder of Carla - [Carla project folder]\Build (4) Build Carla client again (make PythonAPI) (5) Build Carle simulator server again (make launch)
I verified that boost was indeed using python 3.8, you can see it according to its file name as shown:
I verified that dist folder was created and contains the correct version (for python 3.8) of .egg file as shown:
Note: At the beginning, I tried using python 3.9.6 , but I found that thing were failed here and there and therefor I moved to 3.8.10 which was ok.
I have the same exact problem and i tried to build it on an other computer and the same exact error message occured (so the problem is not with my PC ?), i only have one version of python (3.7) and VS2017. Is there any hope i can solve this ? (been stuck with this problem for 3 days now )
I occurred same problem(unresolvable external commands). But I resolved. My cause was I missed to set python path into the PATH environment. My environment is CARLA0.9.11, Python 3.7.9, UE4.24.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, I hit that issue and fix it by myself. I hope my experiences and fixes will be useful to everyone :)
{CARLA_ROOT}/PythonAPI/carla/
:
xerces-c_3.lib
sqlite3.lib
proj.lib
libboost_*.lib
libboot_*.lib
(4 or 5 matches with *), it's caused by a mismatch between your version of Python and the version of Python used by Boost. In most cases it is because you are using conda. Please check Fix for condition A for help.xerces-c_3.lib
, sqlite3.lib
and proj.lib
, Please check Fix for condition B for help.In this case, the paroblem raised by python environment. After my testing, conda and pyenv will have the same problem. For non-pro user, you can use the checklist below:
{CARLA_ROOT}/Build
in CARLAFor pro user, you can check these things in your system:
py -V
to varify it. CARLA use py
command to build. In pyenv cases, this will redirect to your system python setting.using python::"{PATH_TO_PYTHON}"
in %homedrive%%homepath%\user-config.jam
.I did not succeed in successfully compiling the Python API using the Python virtual environment, so we can continue the discussion here :)
In this case, the paroblem caused by a small 'quotation mark missing bug' in {CARLA_ROOT}/Util/BuildTools/Setup.bat
(line 195, 204, 213). This bug will let Windows failed to locate the path in some special cases, such like "C:\Program Files (x86)"
. Using fixes below:
{CARLA_ROOT}/Util/BuildTools/Setup.bat
and find line 195, 204, 213
copy /Y "%INSTALLATION_DIR%\xerces-c-3.2.3-install\lib\xerces-c_3.lib" "%CARLA_PYTHON_DEPENDENCIES%\lib"
copy /Y "%INSTALLATION_DIR%\sqlite3-install\lib\sqlite3.lib" "%CARLA_PYTHON_DEPENDENCIES%\lib"
copy /Y "%INSTALLATION_DIR%\proj-install\lib\proj.lib" "%CARLA_PYTHON_DEPENDENCIES%\lib"
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
In my case, it works to run "make PythonAPI" two times without any changes. But I have no idea why it works.
how to solve this problem? I face the same problem,救命
how to solve this problem? I face the same problem,救命
你解决了吗?我又碰到了一样的问题
Hi! I'm trying to build CARLA 0.9.11 on windows. After running "make PythonAPI", my [Setup] receive success. However, my [BuildLibCarla] ends up with warning below: _build\lib.win-amd64-3.8\carla\libcarla.cp38-winamd64.pyd : fatal error LNK1120: 77 个无法解析的外部命令(unresolvable external commands) error: command 'D:\VS2017\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe' failed with exit status 1120
Although it says "-[BuildPythonAPI]: Carla lib for python has been successfully installed in "D:\carla\PythonAPI\carla\dist"!", dist doesn't show up in carla.
I also notice many warnings shows up like below: libcarla.obj : error LNK2001: 无法解析的外部符号(unresolvable external commands) "class boost::python::handle __cdecl boost::python::objects::registered_class_object(struct boost::python::type_info)" (?registered_class_object@objects@python@boost@@YA?AV?$handle@U_typeobject@@@23@Utype_info@23@@Z)
I've read https://github.com/carla-simulator/carla/pull/2348 and https://github.com/carla-simulator/carla/issues/2339, but couldn't find the solution. If you know how to solve this issue, please give me some advices. Thanks in advance!