Forums

Pandas import error

Struck the following error with pandas 0.19.0 in virtual environment: Import Error - No module named compat.numpy.

Did not get this on my own machine - only occurred when running my webapp in virtualenv on pythonanywhere. Installing latest stable version of pandas (0.19.1) fixed the problem.

Was your virtualenv built to include the global system packages with the --system-site-packages flag?

Thanks for that. Probably not - I followed the instructions on creating a virtual environment here: https://help.pythonanywhere.com/pages/Virtualenvs which doesn't mention the --system-site-packages flag. Is it best to rebuild the virtualenv?

If you have something that works now, with pandas 0.19.1 inside it, then I'd recommend sticking with that.