There is a mature Django project. After it is opened locally, an error is reported: importerror: couldn’t import Django Are you sure it’s installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
solution step 1: because this Django project uses python2.7. My local configuration environment variable is 3.7.7. After importing the Django project locally, the python compiler has been modified to 2.7
but an error is still reported after execution
solution step 2: open the teminal terminal of pycharm
execute the command: source venv/bin/activate
start the Django project: Python manage Py runserver
the Django project was started successfully and the problem was solved perfectly.
- Python: Django exception when executing migrate operation: django.db.utils.OperationalError: (1051, “Unknown table’xxx’”)
- [Solved] Django Configurate celery error: django.db.utils.DatabaseError
- [Solved] Python Django error: error: (1146, “Table ‘mydb.django_session’ doesn’t exist”)
- [Solved] Django Error: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
- [Solved] from django.core.cache import cache Error
- [Solved] Python Project Error: django.core.exceptions.ImproperlyConfigured: WSGI application ‘WebTool.wsgi.application
- Django Issues: TypeError: “Settings” object is irreversible
- [Solved] Django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17).
- Django PythonConsole error: Requested setting DEFAULT_INDEX_TABLESPACE
- [Solved] Import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- [Solved] From pip._internal import cmdoptions ImportError: cannot import name SourceDistribution
- Tensorflow import Error: ImportError: libcuda.so.1: cannot open shared object file: No such file or dire
- [Solved] django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.Did you install mysqlclie
- [Solved] OpenCV Import Error: ImportError: numpy.core.multiarray failed to import
- Django Error: binascii.Error: Incorrect padding [How to Solve]
- [Solved] Django backend processing Base64 file upload error
- Raspberry pie import opencv error: ImportError: numpy.core.multiarray failed to import
- [Solved] Django Error: Attributeerror: ‘wsgirequest’ object has no attribute ‘is_ajax ‘
- Keras import package error: importerror: cannot import name ‘get_ config‘
- Django WSGI protocol application, based on wsgiref module DIY a web framework