Django with numpy, Error:cannot import name multiarray Django with numpy, Error:cannot import name multiarray numpy numpy

Django with numpy, Error:cannot import name multiarray


First you need to make sure you are in the right environment where you installed numpy, Django, etc. Base on your provided information, I'm assuming you have a virtualenv and currently developing your application. If the assumption is right, you can follow this steps.

You don't need Apache for this.

  1. Source you virtualenv, source /path/to/env/bin/activate and go to you project directory.
  2. Make sure you have all the package you need, pip freeze will show you, install if necessary.
  3. Run the built in server from Django, python manage.py runserver
  4. Go to your browser: http://localhost:8000

Voila !


You should tweak your Apache and/or mod_wsgi configuration.

In the lines you show, one can see that a Python 2.7 is being used but is being combined with packages from a virtual environment of Python 3.4. That is completely wrong and should be addressed.

To fix that, the simplest way is to use the following python binary:

/var/www/mapsite/bin/python3.4

instead of the default

/usr/bin/python

Using the explicit virtual environment binary is the way to go in those situations (at least, it has worked for me in a lot of similar scenarios).