They are written in C++.
Python itself is written in C. The Julia github repo shows Julia 68.2%, C 16.3%, C++ 10.4%, Scheme 3.2%. R is a mix of C, C++, R and some Fortran I think...
And how many Python libraries are just plain wrappers, not really written in Python.
I use TensorFlow from .NET ML and C++ API.
However my point was that with Julia, those libraries would have been written in Julia.
All the Python libraries that one throws around for these use cases are C, C++ and Fortran libraries, that happen to have Python wrappers.
Any programming language can have wrappers for them, there is nothing written in Python per se.