Hello, I am facing the same issue on MacOS. I am using Anaconda 64bit, the Python version of my virtual environment is 3.9.18 and I freshly installed XCode.
-
pip install commonroad-drivability-checker==2022.2.1 results in the same error that was mentioned by leomessikum.
- As mentioned, I am using the correct conda version. I also checked that pip of the virtual environment is being used.
-
pip install polygon3 fails with the error message Could not build wheels for polygon3, lxml, which is required to install pyproject.toml-based projects.
Thus, I think that it all boils down to polygon3 which cannot be installed. I cannot find any occurrence of this error online. pip install wheel as described on StackOverflow did not resolve the issues. Any other ideas?
Edit: I was able to resolve the error above using xcode-select --install. Apparently, XCode is not the only requirement but in particular the command line tools. Once you have done this, you have to execute pip install lxml, followed by pip install polygon3. Once you have done this, you get an error that cmake has to be installed, so you have to execute pip install cmake.
After this, there appears another error:
Building wheels for collected packages: commonroad-drivability-checker
Building wheel for commonroad-drivability-checker (setup.py) ... error
error: subprocess-exited-with-error
Click to expand whole error message
CMake Generate step failed. Build files cannot be regenerated correctly.
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/v0/7nn3mz5n3t7096mb_ygnm5yw0000gn/T/pip-install-dp6ljl_c/commonroad-drivability-checker_7ec21fb1f9684ff08c1fcb3dc3272458/setup.py", line 178, in <module>
setup(
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 364, in run
self.run_command("build")
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 131, in run
self.run_command(cmd_name)
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/private/var/folders/v0/7nn3mz5n3t7096mb_ygnm5yw0000gn/T/pip-install-dp6ljl_c/commonroad-drivability-checker_7ec21fb1f9684ff08c1fcb3dc3272458/setup.py", line 44, in run
self.build_extension(ext)
File "/private/var/folders/v0/7nn3mz5n3t7096mb_ygnm5yw0000gn/T/pip-install-dp6ljl_c/commonroad-drivability-checker_7ec21fb1f9684ff08c1fcb3dc3272458/setup.py", line 139, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=build_dir)
File "/Users/username/opt/anaconda3/envs/commonroad-py39/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/v0/7nn3mz5n3t7096mb_ygnm5yw0000gn/T/pip-install-dp6ljl_c/commonroad-drivability-checker_7ec21fb1f9684ff08c1fcb3dc3272458',
'-DPYTHON_INCLUDE_DIR=/Users/username/opt/anaconda3/envs/commonroad-py39/include/python3.9',
'-DPYTHON_LIBRARY=',
'-DPYTHON_EXECUTABLE=/Users/username/opt/anaconda3/envs/commonroad-py39/bin/python',
'-DBUILD_DOC=OFF',
'-DADD_TESTS=OFF',
'-DADD_TRIANGLE=OFF',
'-DADD_PYTHON_BINDINGS=ON',
'-DCMAKE_BUILD_TYPE=Release',
'-DCMAKE_INSTALL_PREFIX:PATH=/private/var/folders/v0/7nn3mz5n3t7096mb_ygnm5yw0000gn/T/pip-install-dp6ljl_c/commonroad-drivability-checker_7ec21fb1f9684ff08c1fcb3dc3272458/build/temp.macosx-10.9-x86_64-cpython-39/dist']'
returned non-zero exit status 1.
This error can then be fixed by explicitly choosing the version vitrus mentioned:
pip install commonroad-drivability-checker==2022.2.1
For me, this install finally worked. I think that the dependency tree for MacOS needs some fixes by code maintainers…