1

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?

2

1 Answer 1

1

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
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.