0

i have a django project and when i tried to run python manage.py migrate i git this error

django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

and i knew i had to run pipenv install so here is my pipfile and below the error ocures when i try to run pipenv install Note : I tried to open pipenv shell first then install and it didnt work

pipfile->

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
django-admin = "*"
django = "*"
djangorestframework = "*"
djangorestframework-simplejwt = "*"
drf-yasg = "*"
django-cors-headers = "*"
django-multiupload = "*"
twilio = "*"
django-redis = "*"
psycopg2-binary = "*"
python-dotenv = "*"
dj-database-url = "*"
django-storages = "*"
boto3 = "*"
gunicorn = "*"
pillow = "*"
django-filter = "*"
ipdata = "*"
pip = "*"
install = "*"

[dev-packages]
black = "*"

[requires]
python_version = "3.11"`

and here is the error I get when i run pipenv install

`Loading .env environment variables...
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing dependencies from Pipfile.lock (f9121b)...
An error occurred while installing django-admin==2.0.2 --hash=sha256:a92f9fb21f63edabb5db9030f36b62c6c16a0187183e7e7de4142aee4472b70f --hash=sha256:43c9f94ca5ad498789c0282691931c609c8e26db61aeb49ae8ad90d15b80cb75! Will try again.        
An error occurred while installing django-excel-response2==3.0.5 --hash=sha256:ba908be16decbdc97b998bd20e596c27da78d23f97b533853c778c8c9c0974e3 --hash=sha256:4bbdd374cadd2d85723d5cd4b49822301141f7e4fef69616639cf3b7535e9ea5! Will try again.
An error occurred while installing django-six==1.0.5 --hash=sha256:9ad505d101ac3ce5a59d22693fcf77b4b19764020e0c7edfe939d220cafbf3a9 --hash=sha256:50816cf52e16814dff58eacd4883d9e5a43be37e53dcbd99323d1139ff89f73b! Will try again.
An error occurred while installing excel-base==1.0.4 --hash=sha256:5b3f2ead44a1b35ed3099e127fc3de9d6eb453bba9acc1058af215e21b4ee20c --hash=sha256:3cdd3ef3366422eda12c7a72157053c8cbd06bcfe63a9280bc443ed21186372f! Will try again.
An error occurred while installing isoweek==1.3.3 --hash=sha256:73f3f7bac443e05a3ab45c32a72048b0c4f26d53d81462ec4b142c7581d3ffe8 --hash=sha256:d3324c497d97f1534669de225ec877964222e4cc773a4a99063086f7a4e342b6! Will try again.
An error occurred while installing pytz-deprecation-shim==0.1.0.post0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' --hash=sha256:af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d --hash=sha256:8314c9692a636c8eb3bda879b9f119e350e93223ae83e70e80c31675a0fdc1a6! Will try again.
An error occurred while installing screen==1.0.1 --hash=sha256:aebfe90de7b8a646d4f3c2b214bd6ffa2ab12ed9d0b14c08620d9c7f7b8ee670 --hash=sha256:29009e0306d005679cc43c8cd69856a046265433310c10e71920591de3c58fda! Will try again.
An error occurred while installing setuptools==67.4.0 ; python_version >= '3.7' --hash=sha256:e5fd0a713141a4a105412233c63dc4e17ba0090c8e8334594ac790ec97792330 --hash=sha256:f106dee1b506dee5102cc3f3e9e68137bbad6d47b616be7991714b0c62204251! Will try again.
An error occurred while installing timeconvert==3.0.13 ; python_version >= '3.5' --hash=sha256:1f4ca99a7e88afe6e19d2d7578078555288055e362f0d170a1e35a8dadf38f03 --hash=sha256:9fa7f2eb43c17b8636171c98a8f599d9308b003395322f11cd4cdaba68cdc89a! Will try again.
An error occurred while installing tzlocal==4.2 ; python_version >= '3.6' --hash=sha256:ee5842fa3a795f023514ac2d801c4a81d1743bbe642e3940143326b3a00addd7 --hash=sha256:89885494684c929d9191c57aa27502afc87a579be5cdd3225c77c463ea043745! Will try again.
Installing initially failed dependencies...
[pipenv.exceptions.InstallError]: Collecting django-admin==2.0.2
[pipenv.exceptions.InstallError]:   Using cached django_admin-2.0.2-py2.py3-none-any.whl (7.6 kB)
[pipenv.exceptions.InstallError]: Collecting django-excel-response2==3.0.5
[pipenv.exceptions.InstallError]:   Using cached django_excel_response2-3.0.5-py2.py3-none-any.whl (4.8 kB)
[pipenv.exceptions.InstallError]: Collecting django-six==1.0.5
[pipenv.exceptions.InstallError]:   Using cached django_six-1.0.5-py2.py3-none-any.whl (2.7 kB)
[pipenv.exceptions.InstallError]: Collecting excel-base==1.0.4
[pipenv.exceptions.InstallError]:   Using cached excel_base-1.0.4-py2.py3-none-any.whl (5.2 kB)
[pipenv.exceptions.InstallError]: Collecting isoweek==1.3.3
[pipenv.exceptions.InstallError]:   Using cached isoweek-1.3.3-py2.py3-none-any.whl (7.1 kB)
[pipenv.exceptions.InstallError]: Collecting pytz-deprecation-shim==0.1.0.post0
[pipenv.exceptions.InstallError]:   Using cached pytz_deprecation_shim-0.1.0.post0-py2.py3-none-any.whl (15 kB)
[pipenv.exceptions.InstallError]: Collecting screen==1.0.1
[pipenv.exceptions.InstallError]:   Using cached screen-1.0.1.tar.gz (8.6 kB)
[pipenv.exceptions.InstallError]:   Preparing metadata (setup.py): started
[pipenv.exceptions.InstallError]:   Preparing metadata (setup.py): finished with status 'done'
[pipenv.exceptions.InstallError]: Collecting setuptools==67.4.0
[pipenv.exceptions.InstallError]:   Using cached setuptools-67.4.0-py3-none-any.whl (1.1 MB)
[pipenv.exceptions.InstallError]: Collecting timeconvert==3.0.13
[pipenv.exceptions.InstallError]:   Using cached TimeConvert-3.0.13-py2.py3-none-any.whl (19 kB)
[pipenv.exceptions.InstallError]: Collecting tzlocal==4.2
[pipenv.exceptions.InstallError]:   Using cached tzlocal-4.2-py3-none-any.whl (19 kB)
[pipenv.exceptions.InstallError]: Building wheels for collected packages: screen
[pipenv.exceptions.InstallError]:   Building wheel for screen (setup.py): started
[pipenv.exceptions.InstallError]:   Building wheel for screen (setup.py): finished with status 'error'
[pipenv.exceptions.InstallError]:   Running setup.py clean for screen
[pipenv.exceptions.InstallError]: Failed to build screen
[pipenv.exceptions.InstallError]: Installing collected packages: screen, isoweek, excel-base, django-six, django-excel-response2, django-admin, tzlocal, timeconvert, setuptools, pytz-deprecation-shim
[pipenv.exceptions.InstallError]:   Running setup.py install for screen: started
[pipenv.exceptions.InstallError]:   Running setup.py install for screen: finished with status 'error'
[pipenv.exceptions.InstallError]: error: subprocess-exited-with-error
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:   × python setup.py bdist_wheel did not run successfully.
[pipenv.exceptions.InstallError]:   │ exit code: 1
[pipenv.exceptions.InstallError]:   ╰─> [15 lines of output]
[pipenv.exceptions.InstallError]:       running bdist_wheel
[pipenv.exceptions.InstallError]:       The [wheel] section is deprecated. Use [bdist_wheel] instead.
[pipenv.exceptions.InstallError]:       running build
[pipenv.exceptions.InstallError]:       running build_py
[pipenv.exceptions.InstallError]:       creating build
[pipenv.exceptions.InstallError]:       creating build\lib.win-amd64-cpython-311
[pipenv.exceptions.InstallError]:       creating build\lib.win-amd64-cpython-311\screen
[pipenv.exceptions.InstallError]:       copying screen\compat.py -> build\lib.win-amd64-cpython-311\screen
[pipenv.exceptions.InstallError]:       copying screen\old_str_util.py -> build\lib.win-amd64-cpython-311\screen
[pipenv.exceptions.InstallError]:       copying screen\__init__.py -> build\lib.win-amd64-cpython-311\screen
[pipenv.exceptions.InstallError]:       warning: build_py: byte-compiling is disabled, skipping.
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:       running build_ext
[pipenv.exceptions.InstallError]:       building 'screen.str_util' extension
[pipenv.exceptions.InstallError]:       error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[pipenv.exceptions.InstallError]:       [end of output]
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:   note: This error originates from a subprocess, and is likely not a problem with pip.
[pipenv.exceptions.InstallError]:   ERROR: Failed building wheel for screen
[pipenv.exceptions.InstallError]:   error: subprocess-exited-with-error
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:   × Running setup.py install for screen did not run successfully.
[pipenv.exceptions.InstallError]:   │ exit code: 1
[pipenv.exceptions.InstallError]:   ╰─> [16 lines of output]
[pipenv.exceptions.InstallError]:       running install
[pipenv.exceptions.InstallError]:       C:\Users\Dream\.virtualenvs\movnw-backend-main-o0TZ4a8E\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
[pipenv.exceptions.InstallError]:         warnings.warn(
[pipenv.exceptions.InstallError]:       running build
[pipenv.exceptions.InstallError]:       running build_py
[pipenv.exceptions.InstallError]:       creating build
[pipenv.exceptions.InstallError]:       creating build\lib.win-amd64-cpython-311
[pipenv.exceptions.InstallError]:       creating build\lib.win-amd64-cpython-311\screen
[pipenv.exceptions.InstallError]:       copying screen\compat.py -> build\lib.win-amd64-cpython-311\screen
[pipenv.exceptions.InstallError]:       copying screen\old_str_util.py -> build\lib.win-amd64-cpython-311\screen
[pipenv.exceptions.InstallError]:       copying screen\__init__.py -> build\lib.win-amd64-cpython-311\screen
[pipenv.exceptions.InstallError]:       warning: build_py: byte-compiling is disabled, skipping.
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:       running build_ext
[pipenv.exceptions.InstallError]:       building 'screen.str_util' extension
[pipenv.exceptions.InstallError]:       error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[pipenv.exceptions.InstallError]:       [end of output]
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:   note: This error originates from a subprocess, and is likely not a problem with pip.
[pipenv.exceptions.InstallError]: error: legacy-install-failure
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: × Encountered error while trying to install package.
[pipenv.exceptions.InstallError]: ╰─> screen
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: note: This is an issue with the package mentioned above, not pip.
[pipenv.exceptions.InstallError]: hint: See above for output from the failure.
ERROR: Couldn't install package: [Requirement(_name='django-admin', vcs=None, req=NamedRequirement(name='django-admin', version='==2.0.2', req=Requirement.parse('django-admin==2.0.2'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=django-admin, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===2.0.2, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=django-admin==2.0.2)>), markers=None, _specifiers='==2.0.2', index='pypi', editable=False, hashes=frozenset({'sha256:a92f9fb21f63edabb5db9030f36b62c6c16a0187183e7e7de4142aee4472b70f', 'sha256:43c9f94ca5ad498789c0282691931c609c8e26db61aeb49ae8ad90d15b80cb75'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=django-admin, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===2.0.2, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=django-admin==2.0.2)>, _ireq=None), Requirement(_name='django-excel-response2', vcs=None, req=NamedRequirement(name='django-excel-response2', version='==3.0.5', req=Requirement.parse('django-excel-response2==3.0.5'), extras=[], editable=False, _parsed_line=<Line (editable=False, 
name=django-excel-response2, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===3.0.5, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=django-excel-response2==3.0.5)>), markers=None, _specifiers='==3.0.5', index=None, editable=False, hashes=frozenset({'sha256:ba908be16decbdc97b998bd20e596c27da78d23f97b533853c778c8c9c0974e3', 'sha256:4bbdd374cadd2d85723d5cd4b49822301141f7e4fef69616639cf3b7535e9ea5'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=django-excel-response2, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===3.0.5, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=django-excel-response2==3.0.5)>, _ireq=None), Requirement(_name='django-six', vcs=None, req=NamedRequirement(name='django-six', version='==1.0.5', req=Requirement.parse('django-six==1.0.5'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=django-six, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===1.0.5, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=django-six==1.0.5)>), markers=None, _specifiers='==1.0.5', index=None, editable=False, hashes=frozenset({'sha256:9ad505d101ac3ce5a59d22693fcf77b4b19764020e0c7edfe939d220cafbf3a9', 'sha256:50816cf52e16814dff58eacd4883d9e5a43be37e53dcbd99323d1139ff89f73b'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=django-six, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===1.0.5, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=django-six==1.0.5)>, _ireq=None), Requirement(_name='excel-base', vcs=None, req=NamedRequirement(name='excel-base', version='==1.0.4', req=Requirement.parse('excel-base==1.0.4'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=excel-base, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===1.0.4, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=excel-base==1.0.4)>), markers=None, _specifiers='==1.0.4', index=None, editable=False, hashes=frozenset({'sha256:5b3f2ead44a1b35ed3099e127fc3de9d6eb453bba9acc1058af215e21b4ee20c', 'sha256:3cdd3ef3366422eda12c7a72157053c8cbd06bcfe63a9280bc443ed21186372f'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=excel-base, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===1.0.4, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=excel-base==1.0.4)>, _ireq=None), Requirement(_name='isoweek', vcs=None, req=NamedRequirement(name='isoweek', version='==1.3.3', req=Requirement.parse('isoweek==1.3.3'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=isoweek, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===1.3.3, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=isoweek==1.3.3)>), markers=None, _specifiers='==1.3.3', index=None, editable=False, hashes=frozenset({'sha256:73f3f7bac443e05a3ab45c32a72048b0c4f26d53d81462ec4b142c7581d3ffe8', 'sha256:d3324c497d97f1534669de225ec877964222e4cc773a4a99063086f7a4e342b6'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=isoweek, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===1.3.3, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=isoweek==1.3.3)>, _ireq=None), Requirement(_name='pytz-deprecation-shim', vcs=None, req=NamedRequirement(name='pytz-deprecation-shim', version='==0.1.0.post0', req=Requirement.parse('pytz-deprecation-shim==0.1.0.post0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4, 3.5"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=pytz-deprecation-shim, path=None, uri=None, extras=(), markers=python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5', vcs=None, specifier===0.1.0.post0, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=pytz-deprecation-shim==0.1.0.post0)>), markers='python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4, 3.5"', _specifiers='==0.1.0.post0', index=None, editable=False, hashes=frozenset({'sha256:af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d', 'sha256:8314c9692a636c8eb3bda879b9f119e350e93223ae83e70e80c31675a0fdc1a6'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=pytz-deprecation-shim, path=None, uri=None, extras=(), markers=python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5', vcs=None, specifier===0.1.0.post0, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=pytz-deprecation-shim==0.1.0.post0)>, _ireq=None), Requirement(_name='screen', vcs=None, req=NamedRequirement(name='screen', version='==1.0.1', req=Requirement.parse('screen==1.0.1'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=screen, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===1.0.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=screen==1.0.1)>), markers=None, _specifiers='==1.0.1', index=None, editable=False, hashes=frozenset({'sha256:aebfe90de7b8a646d4f3c2b214bd6ffa2ab12ed9d0b14c08620d9c7f7b8ee670', 'sha256:29009e0306d005679cc43c8cd69856a046265433310c10e71920591de3c58fda'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=screen, path=None, uri=None, extras=(), markers=None, vcs=None, specifier===1.0.1, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=screen==1.0.1)>, _ireq=None), Requirement(_name='setuptools', vcs=None, req=NamedRequirement(name='setuptools', version='==67.4.0', req=Requirement.parse('setuptools==67.4.0; python_version >= "3.7"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=setuptools, path=None, uri=None, extras=(), markers=python_version >= '3.7', vcs=None, specifier===67.4.0, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=setuptools==67.4.0)>), markers='python_version >= "3.7"', _specifiers='==67.4.0', index=None, editable=False, hashes=frozenset({'sha256:e5fd0a713141a4a105412233c63dc4e17ba0090c8e8334594ac790ec97792330', 'sha256:f106dee1b506dee5102cc3f3e9e68137bbad6d47b616be7991714b0c62204251'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=setuptools, path=None, uri=None, extras=(), markers=python_version >= '3.7', vcs=None, specifier===67.4.0, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=setuptools==67.4.0)>, _ireq=None), Requirement(_name='timeconvert', vcs=None, req=NamedRequirement(name='timeconvert', version='==3.0.13', req=Requirement.parse('timeconvert==3.0.13; python_version >= "3.5"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=timeconvert, path=None, uri=None, extras=(), markers=python_version >= '3.5', vcs=None, specifier===3.0.13, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=timeconvert==3.0.13)>), markers='python_version >= "3.5"', _specifiers='==3.0.13', index=None, editable=False, hashes=frozenset({'sha256:1f4ca99a7e88afe6e19d2d7578078555288055e362f0d170a1e35a8dadf38f03', 'sha256:9fa7f2eb43c17b8636171c98a8f599d9308b003395322f11cd4cdaba68cdc89a'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=timeconvert, path=None, uri=None, extras=(), markers=python_version >= '3.5', vcs=None, specifier===3.0.13, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=timeconvert==3.0.13)>, _ireq=None), Requirement(_name='tzlocal', vcs=None, req=NamedRequirement(name='tzlocal', version='==4.2', req=Requirement.parse('tzlocal==4.2; python_version >= "3.6"'), extras=[], editable=False, _parsed_line=<Line (editable=False, name=tzlocal, path=None, uri=None, extras=(), markers=python_version >= '3.6', vcs=None, specifier===4.2, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=tzlocal==4.2)>), markers='python_version >= "3.6"', _specifiers='==4.2', index=None, editable=False, hashes=frozenset({'sha256:ee5842fa3a795f023514ac2d801c4a81d1743bbe642e3940143326b3a00addd7', 'sha256:89885494684c929d9191c57aa27502afc87a579be5cdd3225c77c463ea043745'}), extras=(), abstract_dep=None, _line_instance=<Line (editable=False, name=tzlocal, path=None, uri=None, extras=(), markers=python_version >= '3.6', vcs=None, specifier===4.2, pyproject=None, pyproject_requires=None, pyproject_backend=None, ireq=tzlocal==4.2)>, _ireq=None)]`

Package installation failed...

ali nasser
  • 23
  • 2

1 Answers1

0

You have to check SETTINGS.py and look for Database part. It says Engine value is missing. Should be 'ENGINE': 'django.db.backends.sqlite3', If you can show your settings.py file

  • we are working with postgre client and the project works with the whole company except me + when i run python manage.py runserver i git this error -> `CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.` and here is the settings `ALLOWED_HOSTS = ["*"] DEBUG = True` – ali nasser Mar 07 '23 at 14:16
  • It would be the best if you could share your SETTINGS.py. Try to set `ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'yourwebsite]`. Also check if your .env file has `DEBUG=False` in case READ_DOT_ENV_FILE is forcing it over DEBUG=True – Puzzleshock Mar 07 '23 at 14:53