Giter VIP home page Giter VIP logo

Comments (14)

Zishuhooo avatar Zishuhooo commented on May 2, 2024

我也遇到了,蹲一个解决办法

from codeanalysis.

Lingghh avatar Lingghh commented on May 2, 2024

可以将pypi源替换为国内的试试

$ mkdir ~/.pip/
$ echo "[global]\nindex-url = https://mirrors.cloud.tencent.com/pypi/simple" >> ~/.pip/pip.conf

from codeanalysis.

michael1981 avatar michael1981 commented on May 2, 2024

谢谢,我试试行不行

from codeanalysis.

michael1981 avatar michael1981 commented on May 2, 2024

可以将pypi源替换为国内的试试

$ mkdir ~/.pip/
$ echo "[global]\nindex-url = https://mirrors.cloud.tencent.com/pypi/simple" >> ~/.pip/pip.conf

这个试过还是一样

from codeanalysis.

Lingghh avatar Lingghh commented on May 2, 2024

麻烦发一下最新的报错信息和执行的命令列表,我们分析一下

from codeanalysis.

michael1981 avatar michael1981 commented on May 2, 2024

docker-compose up -d
Sending build context to Docker daemon 1.611MB
Step 1/6 : FROM python:3.7.12-slim
---> d3c9ad326043
Step 2/6 : ARG EXTRA_TOOLS="gnupg curl wget jq vim-tiny net-tools procps python3-dev default-libmysqlclient-dev locales inotify-tools gcc subversion git telnet iputils-ping vim openssh-client"
---> Using cache
---> 5825811e05c7
Step 3/6 : RUN set -ex && cd / && apt-get update && apt-get install -y --no-install-recommends $EXTRA_TOOLS && apt-get update && apt-get install -y mariadb-client && apt-get clean && echo "LC_ALL=zh_CN.UTF-8" >> /etc/environment && echo "zh_CN.UTF-8 UTF-8" > /etc/locale.gen && echo "LANG=zh_CN.UTF-8" > /etc/locale.conf && locale-gen && ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime && rm -rf /var/cache/apt/* /root/.cache
---> Using cache
---> e4e3bdc15dfa
Step 4/6 : WORKDIR /var/www/django/codedog
---> Using cache
---> 72d858c7e3f0
Step 5/6 : COPY . .
---> dab8cd3a9045
Step 6/6 : RUN mkdir -p log/ && pip install -U setuptools pip && pip install -r requirements.txt
---> Running in ea5d0eb01f7a
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (57.5.0)
Collecting setuptools
Downloading setuptools-60.3.1-py3-none-any.whl (953 kB)
Requirement already satisfied: pip in /usr/local/lib/python3.7/site-packages (21.2.4)
Collecting pip
Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: setuptools, pip
Attempting uninstall: setuptools
Found existing installation: setuptools 57.5.0
Uninstalling setuptools-57.5.0:
Successfully uninstalled setuptools-57.5.0
Attempting uninstall: pip
Found existing installation: pip 21.2.4
Uninstalling pip-21.2.4:
Successfully uninstalled pip-21.2.4
Successfully installed pip-21.3.1 setuptools-60.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Collecting gunicorn==20.1.0
Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)
Collecting Django==3.1.12
Downloading Django-3.1.12-py3-none-any.whl (7.8 MB)
Collecting pymysql==1.0.2
Downloading PyMySQL-1.0.2-py3-none-any.whl (43 kB)
Collecting django-widget-tweaks==1.4.8
Downloading django_widget_tweaks-1.4.8-py2.py3-none-any.whl (11 kB)
Collecting Jinja2==2.11.3
Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Collecting celery==4.3.0
Downloading celery-4.3.0-py2.py3-none-any.whl (413 kB)
Collecting vine==1.3.0
Downloading vine-1.3.0-py2.py3-none-any.whl (14 kB)
Collecting django-celery-results==1.1.2
Downloading django_celery_results-1.1.2-py2.py3-none-any.whl (18 kB)
Collecting redis==3.3.11
Downloading redis-3.3.11-py2.py3-none-any.whl (66 kB)
Collecting celery-redbeat==0.13.0
Downloading celery-redbeat-0.13.0.tar.gz (17 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting flower==0.9.3
Downloading flower-0.9.3.tar.gz (1.3 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting djangorestframework==3.11.1
Downloading djangorestframework-3.11.1-py3-none-any.whl (911 kB)
Collecting coreapi==2.3.3
Downloading coreapi-2.3.3-py2.py3-none-any.whl (25 kB)
Collecting Markdown==3.3.4
Downloading Markdown-3.3.4-py3-none-any.whl (97 kB)
Collecting Pygments==2.8.1
Downloading Pygments-2.8.1-py3-none-any.whl (983 kB)
Collecting django-filter==2.4.0
Downloading django_filter-2.4.0-py3-none-any.whl (73 kB)
Collecting django-cors-headers==3.7.0
Downloading django_cors_headers-3.7.0-py3-none-any.whl (12 kB)
Collecting drf-yasg==1.17.1
Downloading drf_yasg-1.17.1-py2.py3-none-any.whl (1.1 MB)
Collecting pyaes==1.6.1
Downloading pyaes-1.6.1.tar.gz (28 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting pycryptodome==3.9.8
Downloading pycryptodome-3.9.8-cp37-cp37m-manylinux1_x86_64.whl (13.7 MB)
Collecting cryptography==2.9.2
Downloading cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl (2.7 MB)
Collecting rsa==4.7.2
Downloading rsa-4.7.2-py3-none-any.whl (34 kB)
Collecting django-guardian==2.3.0
Downloading django_guardian-2.3.0-py3-none-any.whl (106 kB)
Collecting urllib3==1.26.7
Downloading urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
Collecting django-import-export==2.5.0
Downloading django_import_export-2.5.0-py3-none-any.whl (94 kB)
Collecting sentry-sdk==0.10.2
Downloading sentry_sdk-0.10.2-py2.py3-none-any.whl (78 kB)
Collecting django-prometheus==2.0.0
Downloading django_prometheus-2.0.0-py2.py3-none-any.whl (27 kB)
Collecting djangorestframework-simplejwt==4.4.0
Downloading djangorestframework_simplejwt-4.4.0-py3-none-any.whl (29 kB)
Collecting PyJWT==1.7.1
Downloading PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)
Requirement already satisfied: setuptools>=3.0 in /usr/local/lib/python3.7/site-packages (from gunicorn==20.1.0->-r requirements.txt (line 3)) (60.3.1)
Collecting pytz
Downloading pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting sqlparse>=0.2.2
Downloading sqlparse-0.4.2-py3-none-any.whl (42 kB)
Collecting asgiref<4,>=3.2.10
Downloading asgiref-3.4.1-py3-none-any.whl (25 kB)
Collecting MarkupSafe>=0.23
Downloading MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (31 kB)
Collecting kombu<5.0,>=4.4.0
Downloading kombu-4.6.11-py2.py3-none-any.whl (184 kB)
Collecting billiard<4.0,>=3.6.0
Downloading billiard-3.6.4.0-py3-none-any.whl (89 kB)
Collecting python-dateutil
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting tenacity
Downloading tenacity-8.0.1-py3-none-any.whl (24 kB)
Collecting tornado<6.0.0,>=4.2.0
Downloading tornado-5.1.1.tar.gz (516 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting babel<3.0.0,>=1.0
Downloading Babel-2.9.1-py2.py3-none-any.whl (8.8 MB)
Collecting uritemplate
Downloading uritemplate-4.1.1-py2.py3-none-any.whl (10 kB)
Collecting coreschema
Downloading coreschema-0.0.4.tar.gz (10 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting itypes
Downloading itypes-1.2.0-py2.py3-none-any.whl (4.8 kB)
Collecting requests
Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting importlib-metadata
Downloading importlib_metadata-4.10.0-py3-none-any.whl (17 kB)
Collecting inflection>=0.3.1
Downloading inflection-0.5.1-py2.py3-none-any.whl (9.5 kB)
Collecting ruamel.yaml>=0.15.34
Downloading ruamel.yaml-0.17.20-py3-none-any.whl (109 kB)
Collecting six>=1.10.0
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting packaging
Downloading packaging-21.3-py3-none-any.whl (40 kB)
Collecting cffi!=1.11.3,>=1.8
Downloading cffi-1.15.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (427 kB)
Collecting pyasn1>=0.1.3
Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting tablib[html,ods,xls,xlsx,yaml]>=0.14.0
Downloading tablib-3.1.0-py3-none-any.whl (48 kB)
Collecting diff-match-patch
Downloading diff_match_patch-20200713-py3-none-any.whl (61 kB)
Collecting certifi
Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting prometheus-client>=0.7
Downloading prometheus_client-0.12.0-py2.py3-none-any.whl (57 kB)
Collecting typing-extensions
Downloading typing_extensions-4.0.1-py3-none-any.whl (22 kB)
Collecting pycparser
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting amqp<2.7,>=2.6.0
Downloading amqp-2.6.1-py2.py3-none-any.whl (48 kB)
Collecting zipp>=0.5
Downloading zipp-3.7.0-py3-none-any.whl (5.3 kB)
Collecting ruamel.yaml.clib>=0.2.6
Downloading ruamel.yaml.clib-0.2.6-cp37-cp37m-manylinux1_x86_64.whl (546 kB)
Collecting openpyxl>=2.6.0
Downloading openpyxl-3.0.9-py2.py3-none-any.whl (242 kB)
Collecting pyyaml
Downloading PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (596 kB)
Collecting odfpy
Downloading odfpy-1.4.1.tar.gz (717 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting markuppy
Downloading MarkupPy-1.14.tar.gz (6.8 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting xlwt
Downloading xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
Collecting xlrd
Downloading xlrd-2.0.1-py2.py3-none-any.whl (96 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Downloading pyparsing-3.0.6-py3-none-any.whl (97 kB)
Collecting idna<4,>=2.5
Downloading idna-3.3-py3-none-any.whl (61 kB)
Collecting charset-normalizer~=2.0.0
Downloading charset_normalizer-2.0.10-py3-none-any.whl (39 kB)
Collecting et-xmlfile
Downloading et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Collecting defusedxml
Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Building wheels for collected packages: celery-redbeat, flower, pyaes, coreschema, tornado, markuppy, odfpy
Building wheel for celery-redbeat (setup.py): started
Building wheel for celery-redbeat (setup.py): finished with status 'done'
Created wheel for celery-redbeat: filename=celery_redbeat-0.13.0-py3-none-any.whl size=16157 sha256=dcf10d0a854f89dacc5357325fc858771ef7a6687006dd44b22c06484b041350
Stored in directory: /root/.cache/pip/wheels/2a/b4/3e/902e8aaf686c0dab0e8a645d5ec48cebfb1074a67d60611d53
Building wheel for flower (setup.py): started
Building wheel for flower (setup.py): finished with status 'done'
Created wheel for flower: filename=flower-0.9.3-py2.py3-none-any.whl size=454733 sha256=a9e588c6878751d21b73352f78c54097fc31d87e09d0e58642da32530e498def
Stored in directory: /root/.cache/pip/wheels/c2/48/e5/b1d0c57feb0670064d78b99855dd747931194cb6264960760e
Building wheel for pyaes (setup.py): started
Building wheel for pyaes (setup.py): finished with status 'done'
Created wheel for pyaes: filename=pyaes-1.6.1-py3-none-any.whl size=26362 sha256=cf656fab5ce14391a54935646a4b283704ef813c1a65222fa2345f2e483c88be
Stored in directory: /root/.cache/pip/wheels/42/a3/7d/73d60820adb58d818179cdec3fc1be66f6f7453513a3ff0b05
Building wheel for coreschema (setup.py): started
Building wheel for coreschema (setup.py): finished with status 'done'
Created wheel for coreschema: filename=coreschema-0.0.4-py3-none-any.whl size=15031 sha256=6618fa044fb901f99ec9236d5f480c8d5c9afbbe9ad478427a6377f611742085
Stored in directory: /root/.cache/pip/wheels/29/28/77/73539fe0ce161da7a571cd8278a9296adbda257406bb6f100d
Building wheel for tornado (setup.py): started
Building wheel for tornado (setup.py): finished with status 'done'
Created wheel for tornado: filename=tornado-5.1.1-cp37-cp37m-linux_x86_64.whl size=451884 sha256=c1edd773c1bfbb20553f83812fbcfa30ca8b7359f581cfc1ab3c19cc8c8eca93
Stored in directory: /root/.cache/pip/wheels/83/91/4b/ee8ffb993d3372fc4129c52c9140792c118dda0373b41e7a8f
Building wheel for markuppy (setup.py): started
Building wheel for markuppy (setup.py): finished with status 'done'
Created wheel for markuppy: filename=MarkupPy-1.14-py3-none-any.whl size=7413 sha256=c13bb107038dba4a037f4651a5a3db11a01aae66d4d4a903836bcbbc89eb0f5d
Stored in directory: /root/.cache/pip/wheels/38/2d/77/8b01cae5f0bed4c438be1cc1881158ebc397d5e7b1f3deabc8
Building wheel for odfpy (setup.py): started
Building wheel for odfpy (setup.py): finished with status 'done'
Created wheel for odfpy: filename=odfpy-1.4.1-py2.py3-none-any.whl size=160693 sha256=a9ad6aff1c35e7e2439ba57be34d33eb8f460a9d18253d8a6ebfb3e8beb638a4
Stored in directory: /root/.cache/pip/wheels/e2/f4/5d/a68c656235d33455a1d0f78e877acddfa006907a6d52d7e6ee
Successfully built celery-redbeat flower pyaes coreschema tornado markuppy odfpy
Installing collected packages: zipp, vine, typing-extensions, MarkupSafe, urllib3, sqlparse, pytz, Jinja2, importlib-metadata, idna, et-xmlfile, defusedxml, charset-normalizer, certifi, asgiref, amqp, xlwt, xlrd, uritemplate, tablib, six, ruamel.yaml.clib, requests, pyyaml, pyparsing, pycparser, openpyxl, odfpy, markuppy, kombu, itypes, Django, coreschema, billiard, tornado, tenacity, ruamel.yaml, redis, python-dateutil, PyJWT, pyasn1, prometheus-client, packaging, inflection, djangorestframework, diff-match-patch, coreapi, cffi, celery, babel, sentry-sdk, rsa, pymysql, Pygments, pycryptodome, pyaes, Markdown, gunicorn, flower, drf-yasg, djangorestframework-simplejwt, django-widget-tweaks, django-prometheus, django-import-export, django-guardian, django-filter, django-cors-headers, django-celery-results, cryptography, celery-redbeat
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Successfully installed Django-3.1.12 Jinja2-2.11.3 Markdown-3.3.4 MarkupSafe-2.0.1 PyJWT-1.7.1 Pygments-2.8.1 amqp-2.6.1 asgiref-3.4.1 babel-2.9.1 billiard-3.6.4.0 celery-4.3.0 celery-redbeat-0.13.0 certifi-2021.10.8 cffi-1.15.0 charset-normalizer-2.0.10 coreapi-2.3.3 coreschema-0.0.4 cryptography-2.9.2 defusedxml-0.7.1 diff-match-patch-20200713 django-celery-results-1.1.2 django-cors-headers-3.7.0 django-filter-2.4.0 django-guardian-2.3.0 django-import-export-2.5.0 django-prometheus-2.0.0 django-widget-tweaks-1.4.8 djangorestframework-3.11.1 djangorestframework-simplejwt-4.4.0 drf-yasg-1.17.1 et-xmlfile-1.1.0 flower-0.9.3 gunicorn-20.1.0 idna-3.3 importlib-metadata-4.10.0 inflection-0.5.1 itypes-1.2.0 kombu-4.6.11 markuppy-1.14 odfpy-1.4.1 openpyxl-3.0.9 packaging-21.3 prometheus-client-0.12.0 pyaes-1.6.1 pyasn1-0.4.8 pycparser-2.21 pycryptodome-3.9.8 pymysql-1.0.2 pyparsing-3.0.6 python-dateutil-2.8.2 pytz-2021.3 pyyaml-6.0 redis-3.3.11 requests-2.27.1 rsa-4.7.2 ruamel.yaml-0.17.20 ruamel.yaml.clib-0.2.6 sentry-sdk-0.10.2 six-1.16.0 sqlparse-0.4.2 tablib-3.1.0 tenacity-8.0.1 tornado-5.1.1 typing-extensions-4.0.1 uritemplate-4.1.1 urllib3-1.26.7 vine-1.3.0 xlrd-2.0.1 xlwt-1.3.0 zipp-3.7.0
---> 05f2ab83462b
Successfully built 05f2ab83462b
Successfully tagged codeanalysis_main-worker:latest
Sending build context to Docker daemon 85.5kB
Step 1/6 : FROM python:3.7.12-slim
---> d3c9ad326043
Step 2/6 : ARG EXTRA_TOOLS="gnupg curl wget jq vim-tiny net-tools procps python3-dev default-libmysqlclient-dev locales inotify-tools gcc subversion git telnet iputils-ping vim openssh-client"
---> Using cache
---> 5825811e05c7
Step 3/6 : RUN set -ex && cd / && apt-get update && apt-get install -y --no-install-recommends $EXTRA_TOOLS && apt-get update && apt-get install -y mariadb-client && apt-get clean && echo "LC_ALL=zh_CN.UTF-8" >> /etc/environment && echo "zh_CN.UTF-8 UTF-8" > /etc/locale.gen && echo "LANG=zh_CN.UTF-8" > /etc/locale.conf && locale-gen && ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime && rm -rf /var/cache/apt/* /root/.cache
---> Using cache
---> e4e3bdc15dfa
Step 4/6 : WORKDIR /var/www/django/codedog
---> Using cache
---> 72d858c7e3f0
Step 5/6 : COPY . .
---> 8df5a1337aae
Step 6/6 : RUN mkdir -p log/ && pip install -U setuptools pip && pip install -r requirements.txt
---> Running in f1ba2d75a0bf
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (57.5.0)
Collecting setuptools
Downloading setuptools-60.3.1-py3-none-any.whl (953 kB)
Requirement already satisfied: pip in /usr/local/lib/python3.7/site-packages (21.2.4)
Collecting pip
Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
ERROR: Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher
yield
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 519, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/local/lib/python3.7/http/client.py", line 465, in read
n = self.readinto(b)
File "/usr/local/lib/python3.7/http/client.py", line 509, in readinto
n = self.fp.readinto(b)
File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/local/lib/python3.7/ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "/usr/local/lib/python3.7/ssl.py", line 929, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
status = self.run(options, args)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
return func(self, options, args)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 316, in run
reqs, check_supported_wheels=not options.target_dir
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
collected.requirements, max_rounds=try_to_avoid_resolution_too_deep
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 472, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 341, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
if not criterion.candidates:
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in bool
return bool(self._sequence)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 140, in bool
return any(self)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 128, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 82, in _iter_built_with_inserted
candidate = func()
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 209, in _make_candidate_from_link
version=version,
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 301, in init
version=version,
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in init
self.dist = self._prepare()
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
dist = self._prepare_distribution()
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 306, in _prepare_distribution
self._ireq, parallel_builds=True
File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 508, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 552, in _prepare_linked_requirement
self.download_dir, hashes
File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 243, in unpack_url
hashes=hashes,
File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 102, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/network/download.py", line 145, in call
for chunk in chunks:
File "/usr/local/lib/python3.7/site-packages/pip/_internal/cli/progress_bars.py", line 144, in iter
for x in it:
File "/usr/local/lib/python3.7/site-packages/pip/_internal/network/utils.py", line 87, in response_chunks
decode_content=False,
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/local/lib/python3.7/contextlib.py", line 130, in exit
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 443, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
Sending build context to Docker daemon 85.49kB
Step 1/6 : FROM python:3.7.12-slim
---> d3c9ad326043
Step 2/6 : ARG EXTRA_TOOLS="gnupg curl wget jq vim-tiny net-tools procps python3-dev default-libmysqlclient-dev locales inotify-tools gcc subversion git telnet iputils-ping vim openssh-client"
---> Using cache
---> 5825811e05c7
Step 3/6 : RUN set -ex && cd / && apt-get update && apt-get install -y --no-install-recommends $EXTRA_TOOLS && apt-get update && apt-get install -y mariadb-client && apt-get clean && echo "LC_ALL=zh_CN.UTF-8" >> /etc/environment && echo "zh_CN.UTF-8 UTF-8" > /etc/locale.gen && echo "LANG=zh_CN.UTF-8" > /etc/locale.conf && locale-gen && ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime && rm -rf /var/cache/apt/* /root/.cache
---> Using cache
---> e4e3bdc15dfa
Step 4/6 : WORKDIR /var/www/django/codedog
---> Using cache
---> 72d858c7e3f0
Step 5/6 : COPY . .
---> 219a7ad2c961
Step 6/6 : RUN mkdir -p log/ && pip install -U setuptools pip && pip install -r requirements.txt
---> Running in 990a5f6fec96
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (57.5.0)
Collecting setuptools
Downloading setuptools-60.3.1-py3-none-any.whl (953 kB)
Requirement already satisfied: pip in /usr/local/lib/python3.7/site-packages (21.2.4)
Collecting pip
Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: setuptools, pip
Attempting uninstall: setuptools
Found existing installation: setuptools 57.5.0
Uninstalling setuptools-57.5.0:
Successfully uninstalled setuptools-57.5.0
Attempting uninstall: pip
Found existing installation: pip 21.2.4
Uninstalling pip-21.2.4:
Successfully uninstalled pip-21.2.4
Successfully installed pip-21.3.1 setuptools-60.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Collecting gunicorn==20.1.0
Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)
Collecting Django==3.1.12
Downloading Django-3.1.12-py3-none-any.whl (7.8 MB)
ERROR: Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher
yield
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 519, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/local/lib/python3.7/http/client.py", line 465, in read
n = self.readinto(b)
File "/usr/local/lib/python3.7/http/client.py", line 509, in readinto
n = self.fp.readinto(b)
File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/local/lib/python3.7/ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "/usr/local/lib/python3.7/ssl.py", line 929, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 164, in exc_logging_wrapper
status = run_func(args)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
return func(self, options, args)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 339, in run
reqs, check_supported_wheels=not options.target_dir
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 93, in resolve
collected.requirements, max_rounds=try_to_avoid_resolution_too_deep
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 482, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 349, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
if not criterion.candidates:
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in bool
return bool(self._sequence)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in bool
return any(self)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
candidate = func()
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
version=version,
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 287, in init
version=version,
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in init
self.dist = self._prepare()
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
dist = self._prepare_distribution()
File "/usr/local/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 292, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 528, in _prepare_linked_requirement
link, req.source_dir, self._download, self.download_dir, hashes
File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 217, in unpack_url
hashes=hashes,
File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 94, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/network/download.py", line 145, in call
for chunk in chunks:
File "/usr/local/lib/python3.7/site-packages/pip/_internal/cli/progress_bars.py", line 144, in iter
for x in it:
File "/usr/local/lib/python3.7/site-packages/pip/_internal/network/utils.py", line 87, in response_chunks
decode_content=False,
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/local/lib/python3.7/contextlib.py", line 130, in exit
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 443, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
Sending build context to Docker daemon 23.2kB
Step 1/6 : FROM python:3.7.12-slim
---> d3c9ad326043
Step 2/6 : ARG EXTRA_TOOLS="gnupg curl wget jq vim-tiny net-tools procps python3-dev default-libmysqlclient-dev locales inotify-tools gcc subversion git telnet iputils-ping vim openssh-client"
---> Using cache
---> 5825811e05c7
Step 3/6 : RUN set -ex && cd / && apt-get update && apt-get install -y --no-install-recommends $EXTRA_TOOLS && apt-get update && apt-get install -y mariadb-client && apt-get clean && echo "LC_ALL=zh_CN.UTF-8" >> /etc/environment && echo "zh_CN.UTF-8 UTF-8" > /etc/locale.gen && echo "LANG=zh_CN.UTF-8" > /etc/locale.conf && locale-gen && ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime && rm -rf /var/cache/apt/
/root/.cache
---> Using cache
---> e4e3bdc15dfa
Step 4/6 : WORKDIR /var/www/django/codedog
---> Using cache
---> 72d858c7e3f0
Step 5/6 : COPY . .
---> ded483f93501
Step 6/6 : RUN mkdir -p log/ && pip install -U setuptools pip && pip install -r requirements.txt
---> Running in 19cfdecfb8b5
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (57.5.0)
Requirement already satisfied: pip in /usr/local/lib/python3.7/site-packages (21.2.4)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
Collecting pip
Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.2.4
Uninstalling pip-21.2.4:
Successfully uninstalled pip-21.2.4
Successfully installed pip-21.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Collecting gunicorn==20.1.0
Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB)
Collecting Django==3.1.12
Downloading Django-3.1.12-py3-none-any.whl (7.8 MB)
Collecting pymysql==1.0.2
Downloading PyMySQL-1.0.2-py3-none-any.whl (43 kB)
Collecting djangorestframework==3.11.1
Downloading djangorestframework-3.11.1-py3-none-any.whl (911 kB)
Collecting djangorestframework-simplejwt==4.4.0
Downloading djangorestframework_simplejwt-4.4.0-py3-none-any.whl (29 kB)
Collecting PyJWT==1.7.1
Downloading PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)
Collecting pyaes==1.6.1
Downloading pyaes-1.6.1.tar.gz (28 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting pycryptodome==3.9.8
Downloading pycryptodome-3.9.8-cp37-cp37m-manylinux1_x86_64.whl (13.7 MB)
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
pycryptodome==3.9.8 from https://files.pythonhosted.org/packages/ba/8e/214cd2666d830099561ce75c70d6ac36cdd1018ef9cda45a4b5c310a6f32/pycryptodome-3.9.8-cp37-cp37m-manylinux1_x86_64.whl#sha256=ef39c98d9b8c0736d91937d193653e47c3b19ddf4fc3bccdc5e09aaa4b0c5d21 (from -r requirements.txt (line 20)):
Expected sha256 ef39c98d9b8c0736d91937d193653e47c3b19ddf4fc3bccdc5e09aaa4b0c5d21
Got 4837e669bb38bbe1f829b08c8beb6bb8ad93375bf2f12425f08ba583e02ccae9

3 errors occurred:
* Status: The command '/bin/sh -c mkdir -p log/ && pip install -U setuptools pip && pip install -r requirements.txt' returned a non-zero code: 2, Code: 2
* Status: The command '/bin/sh -c mkdir -p log/ && pip install -U setuptools pip && pip install -r requirements.txt' returned a non-zero code: 2, Code: 2
* Status: The command '/bin/sh -c mkdir -p log/ && pip install -U setuptools pip && pip install -r requirements.txt' returned a non-zero code: 1, Code: 1

from codeanalysis.

Lingghh avatar Lingghh commented on May 2, 2024

可以调整一下 server/dockerconfs/Dockerfile-common文件内容,指定一下镜像源:

RUN mkdir -p log/ && \
    mkdir ~/.pip/ && \
    echo "[global]\nindex-url = https://mirrors.cloud.tencent.com/pypi/simple" >> ~/.pip/pip.conf && \
    pip install -U setuptools pip && \
    pip install -r requirements.txt

from codeanalysis.

michael1981 avatar michael1981 commented on May 2, 2024

可以调整一下 server/dockerconfs/Dockerfile-common文件内容,指定一下镜像源:

RUN mkdir -p log/ && \
    mkdir ~/.pip/ && \
    echo "[global]\nindex-url = https://mirrors.cloud.tencent.com/pypi/simple" >> ~/.pip/pip.conf && \
    pip install -U setuptools pip && \
    pip install -r requirements.txt

还是不行,更换其他源也不可以了

from codeanalysis.

Lingghh avatar Lingghh commented on May 2, 2024

麻烦发一下执行日志哈

from codeanalysis.

michael1981 avatar michael1981 commented on May 2, 2024

docker-compose up -d
Sending build context to Docker daemon 85.49kB
Step 1/6 : FROM python:3.7.12-slim
---> d3c9ad326043
Step 2/6 : ARG EXTRA_TOOLS="gnupg curl wget jq vim-tiny net-tools procps python3-dev default-libmysqlclient-dev locales inotify-tools gcc subversion git telnet iputils-ping vim openssh-client"
---> Using cache
---> 5825811e05c7
Step 3/6 : RUN set -ex && cd / && apt-get update && apt-get install -y --no-install-recommends $EXTRA_TOOLS && apt-get update && apt-get install -y mariadb-client && apt-get clean && echo "LC_ALL=zh_CN.UTF-8" >> /etc/environment && echo "zh_CN.UTF-8 UTF-8" > /etc/locale.gen && echo "LANG=zh_CN.UTF-8" > /etc/locale.conf && locale-gen && ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime && rm -rf /var/cache/apt/* /root/.cache
---> Using cache
---> e4e3bdc15dfa
Step 4/6 : WORKDIR /var/www/django/codedog
---> Using cache
---> 72d858c7e3f0
Step 5/6 : COPY . .
---> 9ad0cb644b46
Step 6/6 : RUN mkdir -p log/ && pip install -U setuptools pip && pip install -r requirements.txt
---> Running in 32d5538a1c78
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (57.5.0)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6d4ac24910>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6d4ac24f50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/

from codeanalysis.

michael1981 avatar michael1981 commented on May 2, 2024

[root@bogon CodeAnalysis]# more ~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

[root@bogon CodeAnalysis]#

from codeanalysis.

Lingghh avatar Lingghh commented on May 2, 2024

这个错误是机器上配置的dns无法解析这个域名,可以测一下有没有其他国内源可以访问通的,或者调整一下当前机器的dns配置

from codeanalysis.

michael1981 avatar michael1981 commented on May 2, 2024

这回好了,不容易

from codeanalysis.

Lingghh avatar Lingghh commented on May 2, 2024

👍辛苦

from codeanalysis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.