我正在使用Mac,从终端,我可以访问osmnx;但是,osmnx功能不能从spyder运行 . 我试图在脚本中使用osmnx来自动化该过程 . 当我尝试运行一个简单的脚本,例如:

import osmnx as ox
graph = ox.load_graphml('NL_motorway.graphml')

我收到以下错误:

File "", line 1, in 
runfile('/Users/salilsharma/surfdrive/My Documents/python/Ksp/osmnx.py', wdir='/Users/salilsharma/surfdrive/My Documents/python/Ksp')

File "/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
execfile(filename, namespace)

File "/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "/Users/salilsharma/surfdrive/My Documents/python/Ksp/osmnx.py", line 9, in 
import osmnx as ox

File "/Users/salilsharma/surfdrive/My Documents/python/Ksp/osmnx.py", line 11, in 
graph = ox.load_graphml('NL_motorway.graphml')
AttributeError: module 'osmnx' has no attribute 'load_graphml'

我使用以下软件 . 操作系统:MacOS Mojave 10.14.1,python 3.6.5,OSMNX版本0.8.2 .