Closed TyceHerrman closed 3 years ago
Is this an OSMnx issue or a NetworkX issue?
I'm not able to reproduce this (on Linux). I just created a virtual environment with python 3.9.2, NetworkX 2.5.1, and OSMnx 1.0.1, and I am able to import OSMnx without error.
Can you provide any further details about how exactly you created your environment? Can you give us step-by-step directions to install and reproduce?
I have python3.9 and try installed networkx2.5.1, and I get the import error
ImportError: cannot import name 'empty_generator' from 'networkx.utils' (C:\Users\azam.bahrehdar1\Anaconda3\envs\geo_env\lib\site-packages\networkx\utils\__init__.py)
Can anyone help that why it is happening?
@raha1986 my best guess is that this sounds like a NetworkX issue: best to open at NetworkX feedstock or at NetworkX repo. Like I mentioned in the comment above:
I'm not able to reproduce this (on Linux). I just created a virtual environment with python 3.9.2, NetworkX 2.5.1, and OSMnx 1.0.1, and I am able to import OSMnx without error.
Can you provide any further details about how exactly you created your environment? Can you give us step-by-step directions to install and reproduce?
Having the same issue, unable to find a solution for this...
@bmitrauncc what versions of Python, NetworkX, and OSMnx are you using? And what OS do you have? How did you install OSMnx? We need more troubleshooting details.
Having a similar issue: ImportError: cannot import name 'argmap' from 'networkx.utils.decorators' (/opt/homebrew/Caskroom/miniforge/base/envs/tensorflow/lib/python3.9/site-packages/networkx/utils/decorators.py)
- Running on Python 3.9 and Networkx on 2.8
I have the same problem. What has been the solution? my versions are networkxy 2.8 and Python 3.9.7 ImportError: cannot import name 'argmap' from 'networkx.utils.decorators' (D:\anaconda\envs\NLP\lib\site-packages\networkx\utils\decorators.py)
Like I mentioned in an earlier comment, we need more troubleshooting details to be able to reproduce this. At a minimum:
The third point is all important here and we cannot troubleshoot without it. FWIW, I am currently running Python 3.9.12, OSMnx 1.1.2, and NetworkX 2.8 on my local Windows, Mac, and Ubuntu machines without trouble. Please confirm you are following the documented installation instructions.
what versions of Python , NetworkX, and OSMnx are you using? Python 3.9.7 NetworkX 2.8,
what OS do you have? Windows 11
OSMnx was not properly updated. Thanks in advance. I think all evil comes from Windows 11 but don't pay much attention to me ;-)
I have the same problem, can anyone tell me how to solve please ?
ImportError: cannot import name 'argmap' from 'networkx.utils.decorators' (C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\networkx\utils\decorators.py)
with patience and updating to the latest networkx, spaci, and related versions... I think conda install -U ... updates all dependencies. Then jupiter sla and turn off anaconda. If you have windows 11 like me, you will have to go to the task control window and manually kill all active browser processes (chorme,...) the one you use. and if you have python processes as was my case, too... go back into anaconda/jupiter and run your code..... tell me... a hello
with patience and updating to the latest networkx, spaci, and related versions... I think conda install -U ... updates all dependencies. Then jupiter sla and turn off anaconda. If you have windows 11 like me, you will have to go to the task control window and manually kill all active browser processes (chorme,...) the one you use. and if you have python processes as was my case, too... go back into anaconda/jupiter and run your code..... tell me... a hello
Thank you dear, I installed networks 2.5.1 and it works fine now.
cannot import name 'from_numpy_matrix' from 'networkx' (/usr/local/lib/python3.9/dist-packages/networkx/init.py)
any idea?
I do have the same problem as @sponline2001. Any solutions are appreciated.
See my previous comment in this thread. No one can help without those troubleshooting details.
Issue: In Python 3.9.2 environment with Networkx 2.5.1 installed, encountering the following error upon importing osmnx: ImportError: cannot import name 'empty_generator' from 'networkx.utils'. Seems to be an issue with Python >= 3.9 and >= Networkx 2.5 https://github.com/smicallef/spiderfoot/issues/1124
Windows 10 and osmnx 1.0.1
Environment (
conda list
):Details about
conda
and system (conda info
):