Installation on macos catalina with python 3.9

Can anyone help me to use Open3D with Python3.9 on MacOS Catalina?

Almost all homebrew packages are based on Python 3.9 these days, so when I typed:
% pip3 install open3d
I got a message:
ERROR: Could not find a version that satisfies the requirement open3d
ERROR: No matching distribution found for open3d
Can anyone make pip or homebrew package for Python 3.9 available?

When I tried to build from source, I got the following error and failed to build.
/xxx/Open3D-0.12.0/3rdparty/GLFW/src/cocoa_init.m:274:1: error:

expected identifier or '('

@interface GLFWLayoutListener : NSObject

My workaround was to add the following line:
set(CMAKE_C_FLAGS “-x objective-c”)
to Line 79 after:
set_source_files_properties(${glfw_SOURCES} PROPERTIES LANGUAGE C)
of 3rdparty/GLFW/src/CMakeLists.txt.

The next problem I encountered is:

[ 74%] Linking CXX shared library …/…/lib/Release/libOpen3D.dylib
Undefined symbols for architecture x86_64:
“Json::CharReaderBuilder::operator[](std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
open3d::(anonymous namespace)::ReadIJsonConvertibleFromJSONStream(std::__1::basic_istream<char, std::__1::char_traits >&, open3d::utility::IJsonConvertible&) in FileJSON.cpp.o

But the json library archive exists:
build % find . -name ‘json.a’
./lib/Release/libOpen3D_3rdparty_jsoncpp.a

The reason is maybe:
the linker requests
“Json::CharReaderBuilder::operator[](std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”
“Json::Value::operator=(Json::Value&&)”
but the Open3d_3rdparty_jsoncpp.a provides
Json::CharReaderBuilder::operator[](std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >)
Json::Value::operator=(Json::Value)
How these functions can be linked?

The previous posts in this thread have been working on Open3D-0.12.0, and I tried with the master branch also.
The problem of the first post occurs and it cannot be solved by the workaround of the second post.
I’m considering to give up building Open3D by myself, to wait the release for python@3.9, and I will turn all homebrew packages back to depending on python@3.8.
I hope Open3D can be installed through homebrew someday.

The error in linking jsoncpp is caused because the Open3D files requests
Json::Value::operator=(Json::Value&&)
Json::Value::operator=(Json::Value const&)
but jsoncpp defines Json::Value::operator=(Json::Value) instead.
I replaced the 3rdparty/jsoncpp files to the newest ones from jsoncpp’s GitHub, and now the compilation terminated without errors.

No one seems to have read this thread…

Even after I built from source, I encountered the problem that the visualizer window doesn’t respond to the keyboard input and cannot be closed, which also happens with the official distribution through pip.

I swapped the 3rdparty/GLFW source to the latest one downloaded from GitHub, and this problem has been solved.
I needed to comment out Lines 75-80 of the GLFW/src/CMakelist.txt.

It seems to update the jsoncpp and GLFW souces to the latest for build from source, and I would like the Open3D developers to apply this fix.

Thanks,