Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure function deploy: Couldn't import Django #11

Open
Jerome-Celle opened this issue Apr 6, 2020 · 0 comments
Open

Azure function deploy: Couldn't import Django #11

Jerome-Celle opened this issue Apr 6, 2020 · 0 comments

Comments

@Jerome-Celle
Copy link

Hi,

I try to deploy your example to azure function. The goals it's to test this service for a Django project on azure function.

But I got this error when I execute the deploy command:

func azure functionapp publish testAppTimeManager

Done in 118 sec(s).
Done running pip install.

Content in source directory is a Django app
Running collectstatic ...
Traceback (most recent call last):
  File "manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 14, in <module>
    import django
ModuleNotFoundError: No module named 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 17, in <module>
    "Couldn't import Django. Are you sure it's installed and "
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?
'collectstatic' exited with exit code 1.
Done in 0 sec(s).

I see in previous log that the pip install is ok, event Django is installed (I can provide the all log)
But the error says: ModuleNotFoundError: No module named 'django'

Do you have an idea? I guess I just miss a small thing

Jerome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant