This is a project written by other people and I am working on adding new features to the project. I am new to python and django so the previous developer helped me setup the environment. It worked fine in the past, but today when I tried to run the server it gave me the error:
(genienv)Xueyangs-MacBook-Pro:userservice xueyangli$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
This is weird because the previous developer did install django on my labtop(otherwise how can I run the server successfully before). But I still run
pip install django
to install django again. Then it downloaded and installed django successfully. Then I tried to run the server again, then it gave me this error:
Xueyangs-MacBook-Pro:userservice xueyangli$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "/Users/xueyangli/anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/Users/xueyangli/anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/Users/xueyangli/anaconda/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/xueyangli/anaconda/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/Users/xueyangli/anaconda/lib/python2.7/site-packages/django/apps/config.py", line 87, in create
module = import_module(entry)
File "/Users/xueyangli/anaconda/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named provider
I could not figure this out and would really appreciate any help. The only reason I could think of which cause this problem is probably I installed anaconda for my other project. But it is just a possibility, I am not sure whether it has any effects.