6
The smart_selects
library executes from django.utils import six
somewhere in its code, which causes an import error because that package was removed in django 3.0.
If you can’t update the offending package (which you can’t in this case) the only solution would be to patch it yourself, or to wait until the owner of the library patches it.
Patching it yourself is trivial:
pip3 install six
- navigate to your virtual environment’s Django install. Using virtualenv that would be here:
/path/to/python/
site-packages/django/utils/__init__.py
- add
import six
Or even better, do it with a bash one-liner:
pip3 install six && echo import six >"$(python3 -c "import sys; print(tuple(filter(lambda x: 'site-packages' in x, sys.path))[0])")"/django/utils/__init__.py
The python3 -c
of the script in quotes depends heavily on being able to determine the location of the site_packages directory, and doesn’t work in some virtual environments. YMMV
2
i think
you have upgraded Django 2 version to Django 3
for transaction from django 2 to 3 you should make following steps:
replace any statement from on_delete='CASCADE'
to on_delete=models.CASCADE
if you had install Django-autocomplete-light
remove it and install it again (i prefer Django-autocomplete-light==3.8.1
)
if you had installed djangorestframework
remove it and install it again ( i prefer djangorestframework==3.12.2
)
i hope it will success for you and every body
- [Django]-Django admin download data as csv
- [Django]-Issue with returning Cyrillic symbols from MSSQL via unixODBC and FreeTDS
- [Django]-Django Rest framework authtoken 'module' object has no attribute 'views'
- [Django]-How to set a field of the model in view using generic views?
- [Django]-Why I am Getting '_SIGCHLDWaker' object has no attribute 'doWrite' in Scrapy?