I’m trying to call some functions in the NetworkX package in my program using PyCall. However I get this error when I try doing this:

using PyCall
nx = pyimport("networkx")
PyObject <module 'networkx' from '/home/minerva/.local/lib/python2.7/site-packages/networkx/__init__.pyc'>
g = nx.parse_gml("$(path)/Bics.gml")
ERROR: type PyObject has no field parse_gml

The same happens when I try using the math package as well. Any idea on why this is happening?

Here is the example I tried. I think there must be some issue regarding the versions of Python

using PyCall
math = pyimport("math")
PyObject <module 'math' from '/home/minerva/.julia/v0.6/Conda/deps/usr/lib/python3.8/lib-dynload/math.cpython-38-x86_64-linux-gnu.so'>
math.sin(math.pi/4)
ERROR: type PyObject has no field sin