I have a Django app which works fine on my development machine. But when moved to a different location on app server for hosting, it does not work. The error
django.core.exceptions.ImproperlyConfigured: 'django-pyodbc-azure' isn't an available database backend. Try using 'django.db.backends.XXX', where XXX is one of: 'mysql', 'oracle', 'postgresql', 'sqlite3'
When I run the pip freeze command on command prompt, it does not even show the pyodbc and the other libraries installed. All it shows is Django 2.1,Django ms-sql and pytz.I cannot install the libraries on app server using pip install(prod server. No connection).
The way I am moving my project from dev to prod machine is by compressing the folder, copying it and then decompressing it. Is copying an issue? Am I missing something here.
Any help is appreciated.
If you can't
pip installon the production server, how are you pointing your WSGI runner (Apache mod_wsgi, gunicorn, or uwsgi) to avenv?What you might be able to do is include the
venvas part of your Django project. This makes one big assumption: that your development and production environments are compatible.pyodbcis compiled, so for the binaries to work, your environments are going to have to be very similar. If that's the case, here's an example:Then copy it to your destination server, and there:
Then adjust your production WSGI runner to point its Python path to
/var/django/my_django_project/venv.