In a Django project of mine, I run this command to run the project on localhost:
python manage.py runserver
It results in the error:
Importerror: No module named memcache
However, I've already fulfilled the requirement via: sudo apt-get install python-memcache
Peculiarly, if I go into the python shell outside my virtualevn and try import memcache
, it works fine. However, inside my virtualenv, if I go into the python shell and try import memcache
, I get the same import error listed above. What's going on?
python --version
to check your default Python interpreter. Check the first line of your app main script (if you don't know where is it, just callwhich <app_name>
– Melisendavirtualenv
to run this application?.. if so, just dopip install memcache
from inside your venv and try to import/run it again. – Melisendapip install python-memcached
(notice the d). If you write that as an answer, I'll accept it. – Cassel