[URGENT] Unable to run the Github documentation of "Running panel in Django"

I am trying to run the “Running apps in Django documentation” locally. I followed the below procedure and I am facing the following errors:

git clone GitHub - holoviz/panel: Panel: The powerful data exploration & web app framework for Python
cd panel/examples/apps/django
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
python manage.py migrate

Error :
AttributeError: module ‘numpy’ has no attribute ‘bool8’. Did you mean: ‘bool’?
Solution:

  1. pip uninstall numpy
  2. pip install numpy==1.23.2 --only-binary :all:
  3. pip install bokeh==2.4.3 panel==0.12.6

Error solved. Next,

python manage.py migrate

(env) (base) harshithakolipaka@Harshithas-MacBook-Air django % python manage.py migrate

Traceback (most recent call last):
File “/Users/harshithakolipaka/panel/examples/apps/django/manage.py”, line 15, in
execute_from_command_line(sys.argv)
File “/Users/harshithakolipaka/panel/examples/apps/django/env/lib/python3.11/site-packages/django/core/management/init.py”, line 419, in execute_from_command_line
utility.execute()
File “/Users/harshithakolipaka/panel/examples/apps/django/env/lib/python3.11/site-packages/django/core/management/init.py”, line 395, in execute
django.setup()
File “/Users/harshithakolipaka/panel/examples/apps/django/env/lib/python3.11/site-packages/django/init.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “/Users/harshithakolipaka/panel/examples/apps/django/env/lib/python3.11/site-packages/django/apps/registry.py”, line 91, in populate
app_config = AppConfig.create(entry)
^^^^^^^^^^^^^^^^^^^^^^^
File “/Users/harshithakolipaka/panel/examples/apps/django/env/lib/python3.11/site-packages/django/apps/config.py”, line 255, in create
return app_config_class(app_name, app_module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Users/harshithakolipaka/panel/examples/apps/django/env/lib/python3.11/site-packages/django/apps/config.py”, line 38, in init
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: The app label ‘bokeh.server.django’ is not a valid Python identifier.

1 Like

Hi, can you post the link to the documentation you refer to please?

Documentation: Running Panel apps inside Django — Panel v1.4.4

Github : panel/examples/apps at main · holoviz/panel · GitHub

I have additionally tried to run the django_multiapps as well but I was facing issues with requirements.txt file and was unable to run the code anymore. I have been struggling to do this since days

Hi
Did you manage to run the Panel app with Django?