Module 'triangle' has no attribute 'triangulate'

Hi again,

in the 2nd tutorial notebook, step 4. I get the error module ‘triangle’ has no attribute ‘triangulate’. I can open the python file where the error occurs (…/tools/commonroad-boundary/triangle_builder.py) and see that it imports triangle (…/tools/commonroad-boundary/triangle) but I guess that is not enough because the class is not specified. So when I change that to (from triangle import triangle_builder) and change the function call accordingly it throws an error saying the arguments don’t match.

I would appreciate any kind of help since I am really stuck with the installation process already over several days.
Max

First of all, did you try using the docker container or the VM?

Did you install the triangle library correctly? (see ‘Installation’ here: https://gitlab.lrz.de/tum-cps/commonroad-search/tree/master/GSMP/tools/commonroad-road-boundary)
From your other question it seems like something with your conda environment is not set up correctly.
Did you activate your environment before installing through pip and are you activating your environment before running your code?

No, I installed it manually because I only saw the updated slides this morning where it says that it is not recommended. But I followed the guide carefully and also always activated the environment when needed.

I am having a look now at the process using the VM.

If you are using linux:
1.simply run: pip install triangle
or build from source:
git clone https://github.com/drufat/triangle.git
cd triangle
python setup.py install
2. then run: pip install polygon3

if you are using other OS, then please try out the virtual machine or the docker image.

Hi!

You probably installed another triangle package. There are many python packages with the same name.