Installation: Reportlab: "ImportError: No module named reportlab.lib"

DeltaG picture DeltaG · Aug 2, 2016 · Viewed 28k times · Source

I've installed reportlab, via

pip install reportlab

(also tried via

easy_install reportlab

)

..but I get the above error. There are other RL imports before that - it's the .lib that it's objecting to. I've had RL working great in the past, but IT reimaged my computer, and I'm trying to rebuild it. The script works fine, but there's something funky with the RL install, I think.

Reportlab: 3.3.0

Answer

B8vrede picture B8vrede · Aug 4, 2016

Most of the times errors like this are caused by an broken package, either in the package it self or in one of it's dependencies.

The best way to resolve such a issue is to force-reinstall the package, it will reinstall the package and its dependencies potentially repairing the package.

To force-reinstall reportlab use:

pip install --upgrade --force-reinstall reportlab