Traceback (most recent call last):
File "/www/wwwroot/serviz.vladmin.top/manage.py", line 22, in <module>
main()
File "/www/wwwroot/serviz.vladmin.top/manage.py", line 13, in main
raise ImportError(
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?
Traceback (most recent call last):
File "/www/wwwroot/serviz.vladmin.top/manage.py", line 11, in main
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'
The above exception was the direct cause of the following exception:
]# pip3 freeze > req.txt
# cat req.txt
asgiref==3.4.1
distlib==0.3.8
Django==3.2.23
filelock==3.4.1
importlib-metadata==4.8.3
importlib-resources==5.4.0
platformdirs==2.4.0
pytube==12.1.2
pytz==2023.3.post1
sqlparse==0.4.4
typing_extensions==4.1.1
virtualenv==20.17.1
zipp==3.6.0
I set it up this time to use root user but to no avail. It is a very simple django admin project with literally 5 things into the database
source 44ce40ae75ae829042ad8dc069e61daf_venv/lib/python3.11/venv/scripts/common/activate
__VENV_PROMPT__[root@vladmin serviz.vladmin.top]# pip3 install pysqlite3
Collecting pysqlite3
Using cached pysqlite3-0.5.2.tar.gz (40 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for pysqlite3, since package 'wheel' is not installed.
Installing collected packages: pysqlite3
Running setup.py install for pysqlite3 ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2x4jldwu/pysqlite3_2bf395c0106748f3ad0a7d3efcedc3e1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2x4jldwu/pysqlite3_2bf395c0106748f3ad0a7d3efcedc3e1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cqv6qig0/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/pysqlite3
cwd: /tmp/pip-install-2x4jldwu/pysqlite3_2bf395c0106748f3ad0a7d3efcedc3e1/
Complete output (20 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/pysqlite3
copying pysqlite3/__init__.py -> build/lib.linux-x86_64-3.6/pysqlite3
copying pysqlite3/dbapi2.py -> build/lib.linux-x86_64-3.6/pysqlite3
running build_ext
Builds a C extension linking against libsqlite3 library
building 'pysqlite3._sqlite3' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DMODULE_NAME="pysqlite3.dbapi2" -I/usr/include -I/usr/include/python3.6m -c src/module.c -o build/temp.linux-x86_64-3.6/src/module.o
In file included from src/module.c:24:0:
src/connection.h:27:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2x4jldwu/pysqlite3_2bf395c0106748f3ad0a7d3efcedc3e1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2x4jldwu/pysqlite3_2bf395c0106748f3ad0a7d3efcedc3e1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cqv6qig0/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/pysqlite3 Check the logs for full command output.
Another hour of trying and nothing... Enjoy