Forums

Problens to import numpy and matplotlib

After spending a long time, it was really bad, I figured out that the problem was to import either numpy or matplotlib. If I just import one of them the site broke.

If I import numpy or matplotlib in your console it works well.

I really don't know how to figure this problem out. I need to use numpy and matplotlib.

hmm I am running a virtualenv of python 3.4. I did a pip install of numpy, pandas, as well as matplotlib (just tried this last one to see if it would work). haven't used matplotlib in this env but it installed fine.

Finaly I figure out what was the problem.

As I said, import the librarie was working, but it was working only on the bash that is not the one that is in the virtualenv. I use this site for more than 3 months and I havent discovery this other bash that is in the virtualenv.

I don't know why, but on the bash of virtualenv the matplotlib and numpy weren't aren't instaled, and in the other bash it is instaled by default. It made me waste 2 days to figure it out.

I solved the problem instaling on the bash of virtualenv the libraries that I was needing.

That sounds like you were using the base system python vs using the python specific to your virtualenv (they are two different things)