Today, when learning Django framework, I wrote the following command:
from django.utils.six import BytesIO
After that, an error is reported as follows:
I looked up the relevant documents, various, did not come to the point.
In fact, the root of this problem is very easy to understand: there may be no such file as six. Py under the path of Django/utils /!!
Taking this machine as an example, I first checked the following path. There is no file “six. Py”.
Next, I chose to use the command line:
pip install six
But the previous command still runs and reports an error, although the six. Py has been downloaded.
At this time, you need to go to your PIP folder and find the file “six. Py”
Then copy the file and paste it under the path of Django/utils
At this point, rerun the command
from django.utils.six import BytesIO
After running successfully, no error is reported
It’s done!!
Read More:
- django.db.utils.OperationalError: no such table: django_admin_log
- Solve the problem of error loading MySQL DB module. Encountered during Django project
- django.core.exceptions . improveconfigured: error loading MySQL DB module. Django configuring MySQL database
- Django. DB. Utils. Programmingerror: (1146, “table * doesn’t exist”) causes and Solutions
- Importerror of Django error: no module named**
- Django. Using f () to solve the competition problem
- When Python Django creates a database, can’t open file ‘ manage.py ‘: [Errno 2] No such file or directory
- django.db.utils .IntegrityError: NOT NULL constraint failed: blog_ blog.author_ ID error resolution
- Django framework uses error reporting exception type: templatedoesnotexist
- django.db.utils.IntegrityError: UNIQUE constraint failed: auth_user.username
- Solutions to Django is not importable in this environment
- Running Django (2.2) project in Python 3.7.9 reports an error
- How to solve the problem of error reporting in Flink
- Cannot find module ‘.. / lib / utils / unsupported. JS’ problem in installing node in centos7
- Practice based on how to tango with Django 1.7 (1)
- Error: command error out with exit status 1: Python when installing mysqlclient in django2.0 setup.py egg_ info
- Solve the problem of using in tensoft 2. X tf.contrib.slim No module named appears in the package: tensorflow.contrib problem
- Python bug: cannot install ‘Django’. It is a distutils installed project and thus we cannot
- Error creating Django application: error on Python side.Exit code:1.
- How to solve the problem of Cannot find module’npmlog’ when installing nodejs under Linux