Skip to content

docker部署执行pip3 install -r python/requirements.txt报错 #2016

@leavecu

Description

@leavecu

pip3 install -r python/requirements.txt
Ignoring numpy: markers 'python_version < "3.5"' don't match your environment
Ignoring numpy: markers 'platform_machine == "aarch64"' don't match your environment
Ignoring sentencepiece: markers 'platform_machine == "aarch64"' don't match your environment
Ignoring opencv-python: markers 'platform_machine == "aarch64"' don't match your environment
Ignoring pillow: markers 'python_version > "3.6"' don't match your environment
Requirement already satisfied: shapely==1.8.0 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 3)) (1.8.0)
Requirement already satisfied: wheel<0.35.0,>=0.34.0 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 4)) (0.34.2)
Requirement already satisfied: setuptools>=44.1.0 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 5)) (59.6.0)
Requirement already satisfied: google>=2.0.3 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 6)) (3.0.0)
Requirement already satisfied: protobuf>=3.12.2 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 7)) (3.19.6)
Requirement already satisfied: grpcio-tools==1.33.2 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 8)) (1.33.2)
Requirement already satisfied: grpcio>=1.28.1 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 9)) (1.33.2)
Requirement already satisfied: func-timeout>=4.3.5 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 10)) (4.3.5)
Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 11)) (6.0.1)
Requirement already satisfied: flask>=1.1.2 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 12)) (1.1.4)
Requirement already satisfied: click==7.1.2 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 13)) (7.1.2)
Requirement already satisfied: itsdangerous==1.1.0 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 14)) (1.1.0)
Requirement already satisfied: Jinja2==2.11.3 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 15)) (2.11.3)
Requirement already satisfied: pyclipper==1.2.1 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 16)) (1.2.1)
Requirement already satisfied: MarkupSafe==1.1.1 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 17)) (1.1.1)
Requirement already satisfied: Werkzeug==1.0.1 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 18)) (1.0.1)
Requirement already satisfied: ujson>=2.0.3 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 19)) (4.3.0)
Requirement already satisfied: sentencepiece==0.1.96 in /usr/local/lib/python3.6/site-packages (from -r python/requirements.txt (line 20)) (0.1.96)
Collecting opencv-python==3.4.17.61
Downloading opencv-python-3.4.17.61.tar.gz (87.8 MB)
|████████████████████████████████| 87.8 MB 39 kB/s
Installing build dependencies ... error
ERROR: Command errored out with exit status 2:
command: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-yiox_qrb/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_machine != '"'"'aarch64'"'"' and platform_machine != '"'"'arm64'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_machine != '"'"'aarch64'"'"' and platform_machine != '"'"'arm64'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_machine != '"'"'aarch64'"'"' and platform_machine != '"'"'arm64'"'"'' 'numpy==1.19.3; python_version<='"'"'3.9'"'"' and sys_platform == '"'"'linux'"'"' and platform_machine == '"'"'aarch64'"'"'' 'numpy==1.21.0; python_version<='"'"'3.9'"'"' and sys_platform == '"'"'darwin'"'"' and platform_machine == '"'"'arm64'"'"'' 'numpy==1.19.3; python_version=='"'"'3.9'"'"' and platform_machine != '"'"'aarch64'"'"' and platform_machine != '"'"'arm64'"'"'' 'numpy==1.21.2; python_version>='"'"'3.10'"'"''
cwd: None
Complete output (94 lines):
Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.8" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "linux" and platform_machine == "aarch64"' don't match your environment
Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment
Ignoring numpy: markers 'python_version == "3.9" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.10"' don't match your environment
Collecting setuptools
Downloading setuptools-59.6.0-py3-none-any.whl (952 kB)
Collecting wheel
Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting scikit-build
Downloading scikit_build-0.16.7-py3-none-any.whl (79 kB)
Collecting cmake
Downloading cmake-3.28.4-py2.py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (26.3 MB)
ERROR: Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher
yield
File "/usr/local/lib/python3.6/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.6/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/local/lib/python3.6/http/client.py", line 449, in read
n = self.readinto(b)
File "/usr/local/lib/python3.6/http/client.py", line 493, in readinto
n = self.fp.readinto(b)
File "/usr/local/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/local/lib/python3.6/ssl.py", line 1002, in recv_into
return self.read(nbytes, buffer)
File "/usr/local/lib/python3.6/ssl.py", line 865, in read
return self._sslobj.read(len, buffer)
File "/usr/local/lib/python3.6/ssl.py", line 625, in read
v = 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.6/site-packages/pip/_internal/cli/base_command.py", line 164, in exc_logging_wrapper
status = run_func(*args)
File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
return func(self, options, args)
File "/usr/local/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 339, in run
reqs, check_supported_wheels=not options.target_dir
File "/usr/local/lib/python3.6/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.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 482, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/usr/local/lib/python3.6/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.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
if not criterion.candidates:
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in bool
return bool(self._sequence)
File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in bool
return any(self)
File "/usr/local/lib/python3.6/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.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
candidate = func()
File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
version=version,
File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 287, in init
version=version,
File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in init
self.dist = self._prepare()
File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
dist = self._prepare_distribution()
File "/usr/local/lib/python3.6/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.6/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.6/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.6/site-packages/pip/_internal/operations/prepare.py", line 217, in unpack_url
hashes=hashes,
File "/usr/local/lib/python3.6/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.6/site-packages/pip/_internal/network/download.py", line 145, in call
for chunk in chunks:
File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/progress_bars.py", line 144, in iter
for x in it:
File "/usr/local/lib/python3.6/site-packages/pip/_internal/network/utils.py", line 87, in response_chunks
decode_content=False,
File "/usr/local/lib/python3.6/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.6/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.6/contextlib.py", line 100, in exit
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/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: Discarding https://files.pythonhosted.org/packages/b6/05/939b6a861cb92885bcf95bbe40929795fca41d36f106e935c3ea74bd9319/opencv-python-3.4.17.61.tar.gz#sha256=cb9580d58628b9934a15d16b189c84dc3ae71ada711ee07acae847e4e701ac81 (from https://pypi.org/simple/opencv-python/) (requires-python:>=3.6). Command errored out with exit status 2: /usr/local/bin/python3.6 /usr/local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-yiox_qrb/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_machine != '"'"'aarch64'"'"' and platform_machine != '"'"'arm64'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_machine != '"'"'aarch64'"'"' and platform_machine != '"'"'arm64'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_machine != '"'"'aarch64'"'"' and platform_machine != '"'"'arm64'"'"'' 'numpy==1.19.3; python_version<='"'"'3.9'"'"' and sys_platform == '"'"'linux'"'"' and platform_machine == '"'"'aarch64'"'"'' 'numpy==1.21.0; python_version<='"'"'3.9'"'"' and sys_platform == '"'"'darwin'"'"' and platform_machine == '"'"'arm64'"'"'' 'numpy==1.19.3; python_version=='"'"'3.9'"'"' and platform_machine != '"'"'aarch64'"'"' and platform_machine != '"'"'arm64'"'"'' 'numpy==1.21.2; python_version>='"'"'3.10'"'"'' Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement opencv-python==3.4.17.61 (from versions: 3.4.0.12, 3.4.0.14, 3.4.1.15, 3.4.2.16, 3.4.2.17, 3.4.3.18, 3.4.4.19, 3.4.5.20, 3.4.6.27, 3.4.7.28, 3.4.8.29, 3.4.9.31, 3.4.9.33, 3.4.10.35, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.14.51, 3.4.14.53, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.0.0.21, 4.0.1.23, 4.0.1.24, 4.1.0.25, 4.1.1.26, 4.1.2.30, 4.2.0.32, 4.2.0.34, 4.3.0.36, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.2.52, 4.5.2.54, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66, 4.7.0.68, 4.7.0.72, 4.8.0.74, 4.8.0.76, 4.8.1.78, 4.9.0.80, 4.10.0.82, 4.10.0.84, 4.11.0.86, 4.12.0.88)
ERROR: No matching distribution found for opencv-python==3.4.17.61

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions