0

I am running python2.7 and there is this problem I am facing on my server when I run nosetests -v to run unit tests against my python+flask application. This app is running on a VE (virtual environment) and I have installed the flask-material design package from GitHub here: https://github.com/HellerCommaA/flask-materialize.

Each time I run nosetests -v to test the application, I get this error:

ImportError: No module named flask_material

but I have imported the module as describe in the docs and I have tried google searching this error but did find a hit. I don't know what I am missing or what I am doing wrong, any help please?

Derick Alangi
  • 1,080
  • 1
  • 11
  • 31
  • 2
    Looks like your virtual environment is not active. – Klaus D. Oct 31 '16 at 11:46
  • 2
    Check your installed modules using command: `pip freeze` – Sohaib Farooqi Oct 31 '16 at 11:49
  • @SohaibFarooqi, yes flask-material is there. Its installed. – Derick Alangi Oct 31 '16 at 11:53
  • @KlausD, What do you mean by its not active? I just created the VE recently. – Derick Alangi Oct 31 '16 at 11:53
  • 2
    Creating a virtual environment isn't enough. You need to activate it as well. Typically this will resemble `source bin/activate` If you have activated it, are you certain that nose is installed in the environment? – dirn Oct 31 '16 at 12:01
  • @dirn, I am in the environment, Its active and I am using it and `nose` is installed on it. That is why I posted the question, I don't get the point for error in importing a package when its installed and I am on the VE. – Derick Alangi Oct 31 '16 at 12:10
  • @d3r1ck check out [this question](http://stackoverflow.com/questions/14604699/how-to-activate-virtualenv) on activating a virtualenv. Once you're in the activated venv, use `pip` to check the installed packages on the venv. – sytech Oct 31 '16 at 12:18
  • @sytech, I have done all that. I am in an activated env and I have checked the installed packages. – Derick Alangi Oct 31 '16 at 12:19
  • Is nose installed to that virtualenv? [similar question](http://stackoverflow.com/questions/864956/problems-using-nose-in-a-virtualenv) describes a few different possible culprits and solutions. – sytech Oct 31 '16 at 12:23
  • @sytech, yes. Nose is installed. – Derick Alangi Oct 31 '16 at 12:23

0 Answers0