0

I am trying to run an existing django app. The app has been built in django-1.10. I set up a new virtualenv and installed the requirements and everything. However, I get errors like the following:

from django.utils import importlib ImportError: cannot import name importlib

Now, the above is from the following source - .virtualenvs/crowd/lib/python2.7/site-packages/account/conf.py

When I manually fix the conf.py file, I still keep getting errors to fix either deprecated or removed features from older django versions.

Any idea as to how to fix this? I thought the purpose of working in virtualenvs was to avoid such errors.

Any suggestions would be much appreciated. Thanks in advance!

This is how the question is different: Even after I fix the importlib import statement, it keeps giving me errors like that of the usage of SubFieldBase and so on.

rishran
  • 596
  • 2
  • 7
  • 26
  • 1
    That file (`account/conf.py`) seems to be included with [`pinax`](https://github.com/pinax/django-user-accounts/blob/master/account/conf.py), not Django core. Try upgrading your `django-user-accounts` package to a more recent version if it doesn't break existing functionality. – Selcuk Feb 15 '17 at 01:32
  • Thanks so much Selcuk! This fixed the problem. – rishran Feb 15 '17 at 01:33
  • Please don't edit a solution into your question. Instead, [add an answer and accept it](https://stackoverflow.com/help/self-answer). – ChrisGPT was on strike Feb 15 '17 at 01:42
  • Done @Chris, thanks! – rishran Feb 15 '17 at 01:54

1 Answers1

1

The problem was not with the Django-core but with django-user-accounts app that was included with pinax. Upgrading the django-user-accounts app fixed the issue.

Thanks to @Selcuk for the solution.

rishran
  • 596
  • 2
  • 7
  • 26