79742547

Date: 2025-08-21 16:17:29
Score: 1
Natty:
Report link

That MemoryError isn’t really conda itself, it’s Python running out of memory while pulling in mpmath (a dependency used internally by Pyomo for math stuff). A couple of things could be happening here
1.Different environments behave differently – on your VM it works because the solver/data combo fits into memory there, but locally maybe your conda env or Python build handles memory differently (32-bit vs 64-bit can matter too).
2.Data size – check N.csv and A.csv. If you accidentally generated much larger input files in this run, Pyomo will happily try to load them all and blow up RAM.
3.mpmath cache bug – older versions of mpmath had issues where the caching function would pre-allocate a big list and trigger MemoryError.

Things you can try:
1.Make sure you’re running 64-bit Python (python -c "import struct; print(struct.calcsize('P')*8)" → should say 64).
2.Update your environment:
3.conda install -c conda-forge mpmath pyomo

Sometimes just upgrading mpmath fixes it.
4.If the data files are genuinely large, try loading smaller slices first to test.
5.If you need more RAM than your machine has, consider running with a solver that streams data instead of building a giant symbolic model in memory.

Quick check: on your VM, what’s the RAM size vs your local machine? Could just be hitting a memory ceiling locally.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Roshan