Looking at the error below, I would recommend the following:
1. Upgrade pip
2. pip uninstall django
3. Reinstall the previous working version of Django and prove it is working
4. Restart the machine
5. Re-install Django 1.11.22
The traceback says it cannot find the contrib module which possibly means the upgrade to 1.11.22 didn't complete correctly the first time.
Good luck
Mike
On Friday, August 23, 2019 at 7:45:00 AM UTC+10, Tom Gertin wrote:
Hello, I have successfully install Django 1.11.22. However, I believe something is wrong because I cannot get the command that lists its version to work, in addition the manage.py help command also produces the same error. Here is the error.$ pip install Django==1.11.22DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.Collecting Django==1.11.22Requirement already satisfied: pytz in /home/ubuntu/.venv/my_geonode/lib/python2.7/site-packages (from Django==1.11.22) (2019.1) Installing collected packages: DjangoFound existing installation: Django 1.11.21Uninstalling Django-1.11.21:Successfully uninstalled Django-1.11.21Successfully installed Django-1.11.22WARNING: You are using pip version 19.1.1, however version 19.2.2 is available.You should consider upgrading via the 'pip install --upgrade pip' command.$ python -m django --versionTraceback (most recent call last):File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main"__main__", fname, loader, pkg_name)File "/usr/lib/python2.7/runpy.py", line 72, in _run_codeexec code in run_globalsFile "/home/ubuntu/.venv/my_geonode/lib/python2.7/site- packages/django/__main__.py", line 9, in <module> management.execute_from_command_line() File "/home/ubuntu/.venv/my_geonode/local/lib/python2.7/ site-packages/django/core/ management/__init__.py", line 364, in execute_from_command_line utility.execute()File "/home/ubuntu/.venv/my_geonode/local/lib/python2.7/ site-packages/django/core/ management/__init__.py", line 338, in execute django.setup()File "/home/ubuntu/.venv/my_geonode/local/lib/python2.7/ site-packages/django/__init__. py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "/home/ubuntu/.venv/my_geonode/local/lib/python2.7/ site-packages/django/apps/ registry.py", line 85, in populate app_config = AppConfig.create(entry)File "/home/ubuntu/.venv/my_geonode/local/lib/python2.7/ site-packages/django/apps/ config.py", line 120, in create mod = import_module(mod_path)File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name)ImportError: No module named contribHelp would be appreciated. Also, what is odd is that if I enter the python console, I can import django and print out the version.Thanks,Tom
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/860ed78d-c46b-4350-8889-cb92cc18d211%40googlegroups.com.
No comments:
Post a Comment