I'm trying to import the module networkx with the Python console in ArcGIS, but I keep getting the error "no module named networkx". I have installed it with the command "pip install networkx".
How can I fix this error?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI'm trying to import the module networkx with the Python console in ArcGIS, but I keep getting the error "no module named networkx". I have installed it with the command "pip install networkx".
How can I fix this error?
I guess you didn't install networkx in the ArcGIS Python environment you are currently using in ArcGIS. To be sure, that you choose the right enviromnent you should change the working Directory to the Scripts Folder of the right Python environment, before installing networkx via pip install networkx
command. E.g.:
ArcGIS Pro:
cd C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Scripts
ArcGIS Desktop (32-bit):
cd C:\Python27\ArcGIS10.x\Scripts
ArcGIS Desktop (64-bit):
C:\Python27\ArcGISx6410.x\Scripts