亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

OSMNX 無法識別任何屬性“AttributeError: module 'osmnx'

OSMNX 無法識別任何屬性“AttributeError: module 'osmnx'

慕神8447489 2024-01-24 16:08:38
我已經使用 conda config --prependchannels conda-forge、conda create -n ox --strict-channel-priority osmnx 安裝了 osmnx。當我嘗試使用 osmnx 模塊時,沒有一個模塊正在工作,例如當我使用時:import osmnx as oxplace_name = "Mitte, Hannover, Germany"ox.graph_from_place(place_name, network_type='drive')我收到錯誤:AttributeError: module 'osmnx' has no attribute 'graph_from_place'當我使用時:import osmnx as oxox.config(use_cache=True, log_console=True)我收到錯誤:AttributeError: module 'osmnx' has no attribute 'config'等等。沒有屬性起作用我還嘗試根據https://osmnx.readthedocs.io/en/stable/osmnx.html#module-osmnx.graph使用屬性,但它也無法解決相同的錯誤:import osmnx as oxplace_name = "Mitte, Hannover, Germany"ox.graph.graph_from_place(place_name, network_type='all_private')AttributeError: module 'osmnx' has no attribute 'graph'ox環境的python版本是3.8.6和Spyder(4.1.4)。您能幫我找到這些錯誤的解決方案嗎?
查看完整描述

1 回答

?
達令說

TA貢獻1821條經驗 獲得超6個贊

您的桌面上有一個名為的文件osmnx.py,并且正在導入該文件而不是已安裝的模塊。重命名該文件。



查看完整回答
反對 回復 2024-01-24
  • 1 回答
  • 0 關注
  • 514 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號