ModuleNotFoundError: No module named 'imp'

14 views
Skip to first unread message

Ellie Devenish

unread,
Dec 12, 2025, 9:18:34 AM (10 days ago) Dec 12
to Linkage Mapper
Hi Linkage Mapper Community, 

I have been running Linkage Mapper successfully over the past few months but my ArcGIS Pro recently updated and I haven't been able to run it since. Is this the likely reason it's not working? I've reinstalled ArcGIS Pro (3.6.0), downloaded the latest Linkage Mapper (3_1_0) and set up a fresh directory but I'm still getting the same error message. I've tried with the demo data and get the same message. 

Here's the error report. 
Thanks for your help
Ellie

Build Network and Map Linkages
=====================
Tool Path

C:\Users\e_dev\Documents\Research\TTPAsForestCoverLocal\NewConnectivity\linkage_mapper_3_1_0\linkage_mapper_3_1_0\toolbox\LinkageMapper.tbx\MapLinkages
=====================
Parameters

Project Directory     C:\Users\e_dev\Documents\Research\TTPAsForestCoverLocal\NewConnectivity\demo\output
Core Area Feature Class     lm_cores
Core Area Field Name     core_id
Resistance Raster     lm_resistances
Step 1 - Identify Adjacent Core Areas     true
Step 2 - Construct a Network of Core Areas     true
Network Adjacency Method     Cost-Weighted & Euclidean
Core Area Distances File     C:\Users\e_dev\Documents\Research\TTPAsForestCoverLocal\NewConnectivity\demo\data\distances_lm_cores.txt
Step 3 - Calculate Cost-Weighted Distances and Least Cost Paths     true
Drop Corridors that Intersect Core Areas     true
Step 4 - Prune Network Using Options Below     true
Option A - Maxium Number of Connected Nearest Neighbors     1
Option B - Nearest Neighbor Measurement Unit     Euclidean
Option C - Connect Neighboring Constellations     true
Step 5 - Calculate, Normalize and Mosaic Corridors     true
Truncate Corridors     true
Truncate Cost-Weighted Distance Threshold     200000
Bounding Circles Buffer Distance     10000
Maximum Cost-Weighted Corridor Distance     100000
Maximum Euclidean Corridor Distance     40000
Output for ModelBuilder Precondition    
Custom Settings File    
=====================
Messages

Start Time: 12 December 2025 14:08:40
Traceback (most recent call last):
  File "C:\Users\e_dev\Documents\Research\TTPAsForestCoverLocal\NewConnectivity\linkage_mapper_3_1_0\linkage_mapper_3_1_0\toolbox\scripts\lm_master.py", line 9, in <module>
    """
  File "C:\Users\e_dev\Documents\Research\TTPAsForestCoverLocal\NewConnectivity\linkage_mapper_3_1_0\linkage_mapper_3_1_0\toolbox\scripts\lm_config.py", line 10, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

Failed script Build Network and Map Linkages...
Failed to execute (MapLinkages).
Failed at 12 December 2025 14:08:42 (Elapsed Time: 1.73 seconds)



John Gallo

unread,
Dec 12, 2025, 4:44:45 PM (10 days ago) Dec 12
to linkage...@googlegroups.com
Hi Ellie,

Ouch, looks like this is a new error caused with version ArcPro 3.6

Interim workaround options:

- Roll back to ArcGIS 3.5, OR
-  Run 3.6 it in a Python ≤3.11 environment where imp still exists, (right?) OR
- Adjust the ArcGIS Pro Python environment accordingly (conda create with an older base Python if that’s compatible with your setup).

If anyone wants to take a stab at updating the linkage mapper code as per this new issue in Github, test it, and then share via a pull request, that would be great!  

It would become v3.1.1 beta.

In other news, a very exciting announcement coming in 2026 that should lead to more funds for faster updates, new features, etc.  In the meantime, folks reading this can be the first to sneak preview our linkage mapper services and get to the front of the queue!

Thanks!

John

--
You received this message because you are subscribed to the Google Groups "Linkage Mapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linkage-mappe...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/linkage-mapper/0ea0d86b-f89b-48a9-a13e-067b3c59ebf3n%40googlegroups.com.


--
John A. Gallo, Ph.D.
Project Director, LinkageMapper.org
Associate, Conservation Biology Institute
Principal, John Gallo Consulting

Eduardo Anaya

unread,
Dec 14, 2025, 1:25:42 PM (8 days ago) Dec 14
to linkage...@googlegroups.com
Cordial saludo

He tratado de descargar la versión de Linkage Mapper 3.0.0 para ArcGis 10.8, pero no es posible acceder al archivo, podrían por favor compartirlo.
Adicionalmente, me aparece el siguiente mensaje al usar la extensión en ArcGisPro 3.5: " Failed to execute costAllocOut = arcpy.sa.CostAllocation(cfg.CORERAS, bResistance, cfg.TMAXCWDIST, cfg.CORERAS,"VALUE", outDistanceRaster);costAllocOut.save(alloc_ras). Si alguien me podría orientar a la posible solución.

De antemano muchas gracias.

Ellie Devenish

unread,
Dec 15, 2025, 4:53:47 AM (7 days ago) Dec 15
to Linkage Mapper
Thanks so much for confirming this John. I managed to download Arcgis 3.5 through my insitution and it worked fine, so definitely an update issue. 

Hopefully someone will be able to help you with the update. 

Ellie
Reply all
Reply to author
Forward
0 new messages