Docker installing wrong django packages












0















Host Machine: WIndows 10



I created a django project that uses an sqlite database. I tried to put my django app in a container using the following dockerfile:



FROM python:3.5


#Enviromental variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

#Work Dir
ADD . /code
WORKDIR /code

# Install dependencies
RUN pip install -r requirements.txt


Dockercompose file:



version: '3.7'

services:
db:
image: postgres:11.1-alpine
volumes:
- pgdata:/var/lib/postgresql/data/
ports:
- 5432:5432
web:
build: .
command: python /code/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- 8000:8000
depends_on:
- db

volumes:
pgdata:


Now, when I try to run the code it gives me this error:



Starting iomweb_db_1 ... done
Starting iomweb_web_1 ... done
Attaching to iomweb_db_1, iomweb_web_1
db_1 | 2018-12-31 20:26:15.535 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2018-12-31 20:26:15.535 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2018-12-31 20:26:15.547 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.
5432"
db_1 | 2018-12-31 20:26:15.576 UTC [19] LOG: database system was interrupted; last known up at 2018
-12-31 19:58:19 UTC
db_1 | 2018-12-31 20:26:16.655 UTC [19] LOG: database system was not properly shut down; automatic
recovery in progress
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: redo starts at 0/17ABE00
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: invalid record length at 0/17ABE38: wanted 24, got 0
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: redo done at 0/17ABE00
db_1 | 2018-12-31 20:26:16.716 UTC [1] LOG: database system is ready to accept connections
web_1 | /usr/local/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wh
eel package will be renamed from release 2.8; in order to keep installing from binary please use "pip
install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-
install-from-pypi>.
web_1 | """)
web_1 | /usr/local/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wh
eel package will be renamed from release 2.8; in order to keep installing from binary please use "pip
install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-
install-from-pypi>.
web_1 | """)
web_1 | Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f4e1a0
75268>
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 225, in wrap
per
web_1 | fn(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/core/management/commands/runserver.py",
line 112, in inner_run
web_1 | autoreload.raise_last_exception()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 248, in rais
e_last_exception
web_1 | raise _exception[1]
web_1 | File "/usr/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 327,
in execute
web_1 | autoreload.check_errors(django.setup)()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 225, in wrap
per
web_1 | fn(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/__init__.py", line 24, in setup
web_1 | apps.populate(settings.INSTALLED_APPS)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/apps/registry.py", line 112, in populat
e
web_1 | app_config.import_models()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/apps/config.py", line 198, in import_mo
dels
web_1 | self.models_module = import_module(models_module_name)
web_1 | File "/usr/local/lib/python3.5/importlib/__init__.py", line 126, in import_module
web_1 | return _bootstrap._gcd_import(name[level:], package, level)
web_1 | File "<frozen importlib._bootstrap>", line 985, in _gcd_import
web_1 | File "<frozen importlib._bootstrap>", line 968, in _find_and_load
web_1 | File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked
web_1 | File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
web_1 | File "<frozen importlib._bootstrap_external>", line 697, in exec_module
web_1 | File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
web_1 | File "/usr/local/lib/python3.5/site-packages/registration/models.py", line 206, in <module>

web_1 | class RegistrationProfile(models.Model):
web_1 | File "/usr/local/lib/python3.5/site-packages/registration/models.py", line 222, in Registra
tionProfile
web_1 | user = models.OneToOneField(UserModelString(), verbose_name=_('user'))


Now, I can manually fix this problem inside of the container under the models; but I am not sure where the docker container is getting these models from. I tried to change the models from the python in the system but still doing this. I would like to fix this so I do not have to fix this manually every time I build this container. I could do a docker commit; but still any help to find out why docker is taking this models.py from.










share|improve this question























  • maybe you can try to delete all the pyc files and try to build and run the dockers

    – ruddra
    Jan 1 at 6:37
















0















Host Machine: WIndows 10



I created a django project that uses an sqlite database. I tried to put my django app in a container using the following dockerfile:



FROM python:3.5


#Enviromental variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

#Work Dir
ADD . /code
WORKDIR /code

# Install dependencies
RUN pip install -r requirements.txt


Dockercompose file:



version: '3.7'

services:
db:
image: postgres:11.1-alpine
volumes:
- pgdata:/var/lib/postgresql/data/
ports:
- 5432:5432
web:
build: .
command: python /code/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- 8000:8000
depends_on:
- db

volumes:
pgdata:


Now, when I try to run the code it gives me this error:



Starting iomweb_db_1 ... done
Starting iomweb_web_1 ... done
Attaching to iomweb_db_1, iomweb_web_1
db_1 | 2018-12-31 20:26:15.535 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2018-12-31 20:26:15.535 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2018-12-31 20:26:15.547 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.
5432"
db_1 | 2018-12-31 20:26:15.576 UTC [19] LOG: database system was interrupted; last known up at 2018
-12-31 19:58:19 UTC
db_1 | 2018-12-31 20:26:16.655 UTC [19] LOG: database system was not properly shut down; automatic
recovery in progress
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: redo starts at 0/17ABE00
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: invalid record length at 0/17ABE38: wanted 24, got 0
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: redo done at 0/17ABE00
db_1 | 2018-12-31 20:26:16.716 UTC [1] LOG: database system is ready to accept connections
web_1 | /usr/local/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wh
eel package will be renamed from release 2.8; in order to keep installing from binary please use "pip
install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-
install-from-pypi>.
web_1 | """)
web_1 | /usr/local/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wh
eel package will be renamed from release 2.8; in order to keep installing from binary please use "pip
install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-
install-from-pypi>.
web_1 | """)
web_1 | Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f4e1a0
75268>
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 225, in wrap
per
web_1 | fn(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/core/management/commands/runserver.py",
line 112, in inner_run
web_1 | autoreload.raise_last_exception()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 248, in rais
e_last_exception
web_1 | raise _exception[1]
web_1 | File "/usr/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 327,
in execute
web_1 | autoreload.check_errors(django.setup)()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 225, in wrap
per
web_1 | fn(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/__init__.py", line 24, in setup
web_1 | apps.populate(settings.INSTALLED_APPS)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/apps/registry.py", line 112, in populat
e
web_1 | app_config.import_models()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/apps/config.py", line 198, in import_mo
dels
web_1 | self.models_module = import_module(models_module_name)
web_1 | File "/usr/local/lib/python3.5/importlib/__init__.py", line 126, in import_module
web_1 | return _bootstrap._gcd_import(name[level:], package, level)
web_1 | File "<frozen importlib._bootstrap>", line 985, in _gcd_import
web_1 | File "<frozen importlib._bootstrap>", line 968, in _find_and_load
web_1 | File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked
web_1 | File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
web_1 | File "<frozen importlib._bootstrap_external>", line 697, in exec_module
web_1 | File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
web_1 | File "/usr/local/lib/python3.5/site-packages/registration/models.py", line 206, in <module>

web_1 | class RegistrationProfile(models.Model):
web_1 | File "/usr/local/lib/python3.5/site-packages/registration/models.py", line 222, in Registra
tionProfile
web_1 | user = models.OneToOneField(UserModelString(), verbose_name=_('user'))


Now, I can manually fix this problem inside of the container under the models; but I am not sure where the docker container is getting these models from. I tried to change the models from the python in the system but still doing this. I would like to fix this so I do not have to fix this manually every time I build this container. I could do a docker commit; but still any help to find out why docker is taking this models.py from.










share|improve this question























  • maybe you can try to delete all the pyc files and try to build and run the dockers

    – ruddra
    Jan 1 at 6:37














0












0








0








Host Machine: WIndows 10



I created a django project that uses an sqlite database. I tried to put my django app in a container using the following dockerfile:



FROM python:3.5


#Enviromental variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

#Work Dir
ADD . /code
WORKDIR /code

# Install dependencies
RUN pip install -r requirements.txt


Dockercompose file:



version: '3.7'

services:
db:
image: postgres:11.1-alpine
volumes:
- pgdata:/var/lib/postgresql/data/
ports:
- 5432:5432
web:
build: .
command: python /code/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- 8000:8000
depends_on:
- db

volumes:
pgdata:


Now, when I try to run the code it gives me this error:



Starting iomweb_db_1 ... done
Starting iomweb_web_1 ... done
Attaching to iomweb_db_1, iomweb_web_1
db_1 | 2018-12-31 20:26:15.535 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2018-12-31 20:26:15.535 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2018-12-31 20:26:15.547 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.
5432"
db_1 | 2018-12-31 20:26:15.576 UTC [19] LOG: database system was interrupted; last known up at 2018
-12-31 19:58:19 UTC
db_1 | 2018-12-31 20:26:16.655 UTC [19] LOG: database system was not properly shut down; automatic
recovery in progress
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: redo starts at 0/17ABE00
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: invalid record length at 0/17ABE38: wanted 24, got 0
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: redo done at 0/17ABE00
db_1 | 2018-12-31 20:26:16.716 UTC [1] LOG: database system is ready to accept connections
web_1 | /usr/local/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wh
eel package will be renamed from release 2.8; in order to keep installing from binary please use "pip
install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-
install-from-pypi>.
web_1 | """)
web_1 | /usr/local/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wh
eel package will be renamed from release 2.8; in order to keep installing from binary please use "pip
install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-
install-from-pypi>.
web_1 | """)
web_1 | Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f4e1a0
75268>
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 225, in wrap
per
web_1 | fn(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/core/management/commands/runserver.py",
line 112, in inner_run
web_1 | autoreload.raise_last_exception()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 248, in rais
e_last_exception
web_1 | raise _exception[1]
web_1 | File "/usr/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 327,
in execute
web_1 | autoreload.check_errors(django.setup)()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 225, in wrap
per
web_1 | fn(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/__init__.py", line 24, in setup
web_1 | apps.populate(settings.INSTALLED_APPS)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/apps/registry.py", line 112, in populat
e
web_1 | app_config.import_models()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/apps/config.py", line 198, in import_mo
dels
web_1 | self.models_module = import_module(models_module_name)
web_1 | File "/usr/local/lib/python3.5/importlib/__init__.py", line 126, in import_module
web_1 | return _bootstrap._gcd_import(name[level:], package, level)
web_1 | File "<frozen importlib._bootstrap>", line 985, in _gcd_import
web_1 | File "<frozen importlib._bootstrap>", line 968, in _find_and_load
web_1 | File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked
web_1 | File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
web_1 | File "<frozen importlib._bootstrap_external>", line 697, in exec_module
web_1 | File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
web_1 | File "/usr/local/lib/python3.5/site-packages/registration/models.py", line 206, in <module>

web_1 | class RegistrationProfile(models.Model):
web_1 | File "/usr/local/lib/python3.5/site-packages/registration/models.py", line 222, in Registra
tionProfile
web_1 | user = models.OneToOneField(UserModelString(), verbose_name=_('user'))


Now, I can manually fix this problem inside of the container under the models; but I am not sure where the docker container is getting these models from. I tried to change the models from the python in the system but still doing this. I would like to fix this so I do not have to fix this manually every time I build this container. I could do a docker commit; but still any help to find out why docker is taking this models.py from.










share|improve this question














Host Machine: WIndows 10



I created a django project that uses an sqlite database. I tried to put my django app in a container using the following dockerfile:



FROM python:3.5


#Enviromental variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

#Work Dir
ADD . /code
WORKDIR /code

# Install dependencies
RUN pip install -r requirements.txt


Dockercompose file:



version: '3.7'

services:
db:
image: postgres:11.1-alpine
volumes:
- pgdata:/var/lib/postgresql/data/
ports:
- 5432:5432
web:
build: .
command: python /code/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- 8000:8000
depends_on:
- db

volumes:
pgdata:


Now, when I try to run the code it gives me this error:



Starting iomweb_db_1 ... done
Starting iomweb_web_1 ... done
Attaching to iomweb_db_1, iomweb_web_1
db_1 | 2018-12-31 20:26:15.535 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2018-12-31 20:26:15.535 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2018-12-31 20:26:15.547 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.
5432"
db_1 | 2018-12-31 20:26:15.576 UTC [19] LOG: database system was interrupted; last known up at 2018
-12-31 19:58:19 UTC
db_1 | 2018-12-31 20:26:16.655 UTC [19] LOG: database system was not properly shut down; automatic
recovery in progress
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: redo starts at 0/17ABE00
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: invalid record length at 0/17ABE38: wanted 24, got 0
db_1 | 2018-12-31 20:26:16.662 UTC [19] LOG: redo done at 0/17ABE00
db_1 | 2018-12-31 20:26:16.716 UTC [1] LOG: database system is ready to accept connections
web_1 | /usr/local/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wh
eel package will be renamed from release 2.8; in order to keep installing from binary please use "pip
install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-
install-from-pypi>.
web_1 | """)
web_1 | /usr/local/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wh
eel package will be renamed from release 2.8; in order to keep installing from binary please use "pip
install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-
install-from-pypi>.
web_1 | """)
web_1 | Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f4e1a0
75268>
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 225, in wrap
per
web_1 | fn(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/core/management/commands/runserver.py",
line 112, in inner_run
web_1 | autoreload.raise_last_exception()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 248, in rais
e_last_exception
web_1 | raise _exception[1]
web_1 | File "/usr/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 327,
in execute
web_1 | autoreload.check_errors(django.setup)()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/utils/autoreload.py", line 225, in wrap
per
web_1 | fn(*args, **kwargs)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/__init__.py", line 24, in setup
web_1 | apps.populate(settings.INSTALLED_APPS)
web_1 | File "/usr/local/lib/python3.5/site-packages/django/apps/registry.py", line 112, in populat
e
web_1 | app_config.import_models()
web_1 | File "/usr/local/lib/python3.5/site-packages/django/apps/config.py", line 198, in import_mo
dels
web_1 | self.models_module = import_module(models_module_name)
web_1 | File "/usr/local/lib/python3.5/importlib/__init__.py", line 126, in import_module
web_1 | return _bootstrap._gcd_import(name[level:], package, level)
web_1 | File "<frozen importlib._bootstrap>", line 985, in _gcd_import
web_1 | File "<frozen importlib._bootstrap>", line 968, in _find_and_load
web_1 | File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked
web_1 | File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
web_1 | File "<frozen importlib._bootstrap_external>", line 697, in exec_module
web_1 | File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
web_1 | File "/usr/local/lib/python3.5/site-packages/registration/models.py", line 206, in <module>

web_1 | class RegistrationProfile(models.Model):
web_1 | File "/usr/local/lib/python3.5/site-packages/registration/models.py", line 222, in Registra
tionProfile
web_1 | user = models.OneToOneField(UserModelString(), verbose_name=_('user'))


Now, I can manually fix this problem inside of the container under the models; but I am not sure where the docker container is getting these models from. I tried to change the models from the python in the system but still doing this. I would like to fix this so I do not have to fix this manually every time I build this container. I could do a docker commit; but still any help to find out why docker is taking this models.py from.







django docker






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 31 '18 at 20:32









user2067030user2067030

2141214




2141214













  • maybe you can try to delete all the pyc files and try to build and run the dockers

    – ruddra
    Jan 1 at 6:37



















  • maybe you can try to delete all the pyc files and try to build and run the dockers

    – ruddra
    Jan 1 at 6:37

















maybe you can try to delete all the pyc files and try to build and run the dockers

– ruddra
Jan 1 at 6:37





maybe you can try to delete all the pyc files and try to build and run the dockers

– ruddra
Jan 1 at 6:37












2 Answers
2






active

oldest

votes


















0














I was able to resolve this issue. The problem was that django-registration-redux library that I was installing was not compatible with Django 2.0. Once I updated this package to the latest version it was all good.






share|improve this answer































    -1














    Create a run.sh file and write below;



    python manage.py makemigrations && 
    python manage.py migrate &&
    python manage.py runserver 0.0.0.0:8000


    And in you docker-compose.yml file write below;



    ...
    web:
    build: .
    command: sh run.sh
    ...





    share|improve this answer
























    • Did that and still getting the on_delete missing from models.py on /python35/site-packages/registration/models.py

      – user2067030
      Jan 1 at 4:09











    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53991209%2fdocker-installing-wrong-django-packages%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I was able to resolve this issue. The problem was that django-registration-redux library that I was installing was not compatible with Django 2.0. Once I updated this package to the latest version it was all good.






    share|improve this answer




























      0














      I was able to resolve this issue. The problem was that django-registration-redux library that I was installing was not compatible with Django 2.0. Once I updated this package to the latest version it was all good.






      share|improve this answer


























        0












        0








        0







        I was able to resolve this issue. The problem was that django-registration-redux library that I was installing was not compatible with Django 2.0. Once I updated this package to the latest version it was all good.






        share|improve this answer













        I was able to resolve this issue. The problem was that django-registration-redux library that I was installing was not compatible with Django 2.0. Once I updated this package to the latest version it was all good.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 1 at 7:13









        user2067030user2067030

        2141214




        2141214

























            -1














            Create a run.sh file and write below;



            python manage.py makemigrations && 
            python manage.py migrate &&
            python manage.py runserver 0.0.0.0:8000


            And in you docker-compose.yml file write below;



            ...
            web:
            build: .
            command: sh run.sh
            ...





            share|improve this answer
























            • Did that and still getting the on_delete missing from models.py on /python35/site-packages/registration/models.py

              – user2067030
              Jan 1 at 4:09
















            -1














            Create a run.sh file and write below;



            python manage.py makemigrations && 
            python manage.py migrate &&
            python manage.py runserver 0.0.0.0:8000


            And in you docker-compose.yml file write below;



            ...
            web:
            build: .
            command: sh run.sh
            ...





            share|improve this answer
























            • Did that and still getting the on_delete missing from models.py on /python35/site-packages/registration/models.py

              – user2067030
              Jan 1 at 4:09














            -1












            -1








            -1







            Create a run.sh file and write below;



            python manage.py makemigrations && 
            python manage.py migrate &&
            python manage.py runserver 0.0.0.0:8000


            And in you docker-compose.yml file write below;



            ...
            web:
            build: .
            command: sh run.sh
            ...





            share|improve this answer













            Create a run.sh file and write below;



            python manage.py makemigrations && 
            python manage.py migrate &&
            python manage.py runserver 0.0.0.0:8000


            And in you docker-compose.yml file write below;



            ...
            web:
            build: .
            command: sh run.sh
            ...






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 1 at 0:25









            ozcanyarimdunyaozcanyarimdunya

            36335




            36335













            • Did that and still getting the on_delete missing from models.py on /python35/site-packages/registration/models.py

              – user2067030
              Jan 1 at 4:09



















            • Did that and still getting the on_delete missing from models.py on /python35/site-packages/registration/models.py

              – user2067030
              Jan 1 at 4:09

















            Did that and still getting the on_delete missing from models.py on /python35/site-packages/registration/models.py

            – user2067030
            Jan 1 at 4:09





            Did that and still getting the on_delete missing from models.py on /python35/site-packages/registration/models.py

            – user2067030
            Jan 1 at 4:09


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53991209%2fdocker-installing-wrong-django-packages%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            MongoDB - Not Authorized To Execute Command

            How to fix TextFormField cause rebuild widget in Flutter

            in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith