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.
- Error: [errno 11001] getaddrinfo failed [How to Solve]
- [Solved] Django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17).
- Django Issues: TypeError: “Settings” object is irreversible
- [Solved] SyntaxError: Generator expression must be parenthesized (widgets.py, line 152)
- [Solved] Python Django error: error: (1146, “Table ‘mydb.django_session’ doesn’t exist”)
- Django PythonConsole error: Requested setting DEFAULT_INDEX_TABLESPACE
- Django Error: binascii.Error: Incorrect padding [How to Solve]
- Python: Django exception when executing migrate operation: django.db.utils.OperationalError: (1051, “Unknown table’xxx’”)
- [Solved] MAC terminal Use ‘CONDA activate’ and ‘CONDA install package_ Error reported by name’ Error
- [Solved] AttributeError: ‘Manager‘ object has no attribute ‘get_by_natural_key‘
- [Solved] Error when vscode activates Python virtual environment
- How to Solve PyInstaller Package Error: ModuleNotFoundError: No module named ‘xxxx‘
- VScode import numpy Error: DLL load failed [How to Solve]
- Import win32API; importerror: DLL load failed: the specified program was not found
- [Solved] from django.core.cache import cache Error
- [Solved] django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.Did you install mysqlclie
- [Solved] Failed environment install leads to “unable to create process using“ error
- VScode Run CONDA environment Error [How to Solve]
- Linux Fatal Python error: Py_Initialize Unable to get the locale encoding
- [Solved] Django Error: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.