cityjson / cjio

CityJSON/io: Python CLI to process and manipulate CityJSON files
MIT License
119 stars 31 forks source link

OBJ export fails due to missing module mapbox_earcut #52

Closed Itsman-AT closed 4 years ago

Itsman-AT commented 4 years ago

I tried to convert a cityjson file to obj and got the error message:

OBJ export skipped: Python module 'mapbox_earcut' missing (to triangulate faces)

After investigating on mapbox_earcut, I got to this page:

https://github.com/cityjson/cjio/issues/23#issue-506831783

and tried to install it, but the installation procedure is not well (if at all) described. Could you give me a hand? I got as far as getting cmake to configure the mapbox_earcut:

-- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.9") -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so -- Performing Test HAS_CPP14_FLAG -- Performing Test HAS_CPP14_FLAG - Success -- pybind11 v2.2.2 -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- LTO enabled -- Configuring done -- Generating done

What is the last step to get cijo getting to recognise the mapbox_earcut? Any other way of getting the mapbox_earcut into cijo? Thanks!

hugoledoux commented 4 years ago

Have you tried to install the python bindings? https://pypi.org/project/mapbox-earcut/ Once installed cjio will detect it's there if all went well.

I can't tell what was done above

Itsman-AT commented 4 years ago

@hugoledoux : Thanks I will try this. Tried to build it from source and did not succeed so far.

Itsman-AT commented 4 years ago

@hugoledoux : Thanks, this worked.

For future reference: On my Ubuntu 18.04 system I had to use the right pip. So, instead of just using pip, use pip3. So, if you installed cijo like this:

pip3 install cjio

use:

pip3 install mapbox-earcut