-3

Is there any way to use python libraries like pandas, numpy, scipy, pytorch, ... from Go programming language?

I know that these libraries are not programmed in python but in c, so maybe it is easy to call funcions from golang.

Amparo
  • 784
  • 1
  • 4
  • 21
  • 1
    Be aware these libraries are *not* programmed in C. They use extensions that are programmed in C, via wrappers programmed for the Python C-API, often via more wrappers programmed in Python. – MisterMiyagi May 10 '21 at 12:10

1 Answers1

0

I don't know how practical it would be but if it's a little piece of code you can run it using go's "os/exec" package like so:

exec.Command("python",  "-c", "import pythonfile; print pythonfile.cat_strings('foo', 'bar')")
Baruch
  • 1