Forums

Missing required dependencies ['numpy']

I'm getting an error 'Missing required dependencies ['numpy']'. But, when I try to install numpy, it says it is already there. Please help.

   > python fileupload_flask.py

  Traceback (most recent call last):

   File "fileupload_flask.py", line 4, in <module>

    import Consolidated

  File "/home/selvaprakash/BillD/Consolidated.py", line 1, in <module>

    import pandas as pd

  File "/home/selvaprakash/.local/lib/python2.7/site-packages/pandas/__init__.py", line 19, in <module>

    "Missing required dependencies {0}".format(missing_dependencies))

ImportError: Missing required dependencies ['numpy']

05:12 ~/BillD $ pip install numpy

Requirement already satisfied (use --upgrade to upgrade): numpy in

/home/selvaprakash/.local/lib/python2.7/site-packages

[edit by admin: formatting]

That's very odd. What do you get if you run

echo $PYTHONPATH

...in the same bash console where you're running your script?

It is resolved now. Tried to import numpy from python console and got the below error.

ImportError: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

So, tried uninstalling and reinstalling numpy. It allowed me to uninstall but not install again saying that numpy already exists. But this time 'import numpy' worked. Thanks for your response :)

How odd! It sounds like you must have had a somehow-broken numpy installed in your ~/.local directory, but now you're using the system-installed one. Well, anyway, glad it works now :-)