Closed pmventura closed 3 years ago
For docker-compose.yml
FROM python:3.7
ENV PYTHONUNBUFFERED 1
ENV TERM xterm
RUN echo "deb http://ftp.de.debian.org/debian buster main" > /etc/apt/sources.list.d/buster.list
RUN apt-get update -y &&\
apt-get install -y gfortran libopenblas-dev liblapack-dev git cron supervisor vim less libmagic1 poppler-utils build-essential python3-cffi libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info tesseract-ocr fonts-roboto fonts-lato fonts-dancingscript &&\
apt-get clean &&\
rm -rf /var/lib/apt/lists/*
# upgrade pip
RUN pip install --upgrade pip setuptools==41.2.0 requests==2.22.0
RUN pip install numpy==1.17.1
RUN pip install pandas==0.25.1
RUN pip install scipy==1.3.1
ADD requirements/base.txt ./python-project/requirements/base.txt
RUN pip install -r ./python-project/requirements/base.txt
ADD . ./python-project
EXPOSE 80
RUN ln -s /python-project/devop/supervisor-app.conf /etc/supervisor/conf.d/
COPY ./docker-entrypoint.sh /
COPY /local_settings_docker.py /python-project/local_settings.py
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["backend"]
For base.txt or known as (requirements.txt)
django-filebrowser==3.10.1
django-tinymce==2.7.0
Django==2.2.7
numpy==1.17.1
pandas==0.25.1
pandas-datareader==0.8.1
CVXcanon==0.0.23.3
cvxopt==1.2.3
cvxpy==1.0.25
scikit-learn==0.21.3
scipy==1.3.1
statsmodels==0.10.1
django-pandas==0.6.0
xlrd==1.2.0
django-redis==4.10.0
requests==2.22.0
beautifulsoup4==4.5.1
lxml==4.4.1
diff-match-patch==20121119
django-anymail==0.5
django-authority==0.9
django-ckeditor==5.6.1
django-common-helpers==0.7.0
django-compat==1.0.15
django-cron==0.5.1
celery==4.2.1
django-filter==2.2.0
django-flat-theme==1.1.3
django-haystack==2.4.1
django-import-export==1.0.1
django-localflavor-au-tjh==1.1.2
django-mptt==0.7.4
django_nose==1.4.5
django-nested-admin==3.1.3
django-phonenumber-field==1.1.0
-e git://github.com/darklow/django-suit.git@v2#egg=django-suit
django-taggit==0.17.5
git+git://github.com/chibisov/drf-extensions@33b50a8d2ba21bf1a612333ea5d5aea845534eb2
ecos==2.0.4
Markdown==2.6.5
pexpect==4.0.1
Pillow==5.2.0
pydenticon==0.2
pinax-eventlog==2.0.3
psycopg2-binary==2.7.5
ptyprocess==0.5
PyPDF2==1.26.0
pysftp==0.2.8
python-dateutil==2.8.0
pytz==2018.7
tzlocal==1.3
scs==1.1.7
six==1.10.0
git+git://github.com/kennethreitz/tablib@ddc4bd30f22e40ae4e3aa9347747f1f96912191a
toolz==0.10.0
ujson==1.34
sqlparse==0.3.0
cairocffi==1.1.0
cffi==1.13
CairoSVG==2.4.2
pbr==5.1.1
weasyprint==50
django-test-without-migrations==0.6
django-bootstrap3==11.0.0
djangorestframework==3.9
drf-yasg==1.16.1
packaging==19.1
plaid-python==2.3.3
google-api-python-client>=1.6.2
MicrosoftHealth>=0.1.0
git+https://github.com/maximebf/python-withings.git
stripe==1.53.0
oauth2client==4.1.2
django-model-utils==2.3.1
# re-enable after fixing # django-notifications-hq>=1.0 # upgrade to 1.0 later
django-extensions==2.2.1 # to visualize models
azure==4.0.0
django-storages==1.7.1
git+git://github.com/blampe/IbPy.git
django-recurrence==1.3.0
pygeoip==0.3.2
jira==2.0.0
python-gnupg==0.4.0
Honestly this sounds like your requirements.txt
is not specific enough to reproduce the correct set of installed packages. I don't see this as an issue with the Docker image. I would guess that running with venv
it has already set up your local directory and so already has the set of packages installed and doesn't need to do any dependency satisfiability solving.
In the future, it'd be better to post questions like this in the Docker Community Forums, the Docker Community Slack, or Stack Overflow.
@pmventura Did you solve this? i'm seeing similar issues, and it appears to be due to a problem with the dependency resolver introduced in pip 21.2.
Hi everyone,
Having issues with version dependencies when running
pip install
on docker. However, when installing on my mac without docker and just virtualenv, works perfectly fine.Mac OS - macOS Mojave v10.14. Python Version - v3.7.3 Docker Compose Version - version 1.27.4, build 40524192
Here's the first error I got when running the docker-compose up
I tried to loosen the
six
package fromsix==1.10.0
tosix>=1.2,<=1.15.0
And throws a different error for
requests
package this time. Here's the errorAfter changing the package from
requests==2.22.0
torequests>=2.0.0,<=2.25.1
. Now, it takes ages to finish the installation.