换源解决pip超时问题: pip._vendor.urllib3.exceptions.SSLError

操作:

(tensorflow_venv) songroom@DESKTOP-MEDPUTU:~$ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow

问题:

pip._vendor.urllib3.exceptions.SSLError

详见:

(tensorflow_venv) songroom@DESKTOP-MEDPUTU:~$ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting tensorflow
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/5f/85/b9e92264b5b4fb3ecc4c6a71f7a046d7b7cf630e1a8a7d87245386fbdd5a/tensorflow-2.8.0-cp310-cp310-manylinux2010_x86_64.whl (497.6 MB)
     ━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 25.7/497.6 MB 2.0 MB/s eta 0:03:52
ERROR: Exception:
Traceback (most recent call last):
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher
    yield
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 519, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 90, in read
    data = self.__fp.read(amt)
  File "/usr/lib/python3.10/http/client.py", line 465, in read
    s = self.fp.read(amt)
  File "/usr/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.10/ssl.py", line 1273, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.10/ssl.py", line 1129, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2548)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 339, in run
    requirement_set = resolver.resolve(
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
    result = self._result = resolver.resolve(
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
    if not criterion.candidates:
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
    return bool(self._sequence)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
    return any(self)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
    candidate = func()
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 215, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 288, in __init__
    super().__init__(
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in __init__
    self.dist = self._prepare()
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
    dist = self._prepare_distribution()
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 299, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 487, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 532, in _prepare_linked_requirement
    local_file = unpack_url(
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 214, in unpack_url
    file = get_http_url(
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 94, in get_http_url
    from_path, content_type = download(link, temp_dir.path)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/network/download.py", line 146, in __call__
    for chunk in chunks:
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/cli/progress_bars.py", line 304, in _rich_progress_bar
    for chunk in iterable:
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_internal/network/utils.py", line 63, in response_chunks
    for chunk in response.raw.stream(
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 576, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 512, in read
    with self._error_catcher():
  File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/home/songroom/tensorflow_venv/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 449, in _error_catcher
    raise SSLError(e)
pip._vendor.urllib3.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2548)
(tensorflow_venv) songroom@DESKTOP-MEDPUTU:~$ 

解决方案: 换源

(tensorflow_venv) songroom@DESKTOP-MEDPUTU:~$ pip install  tensorflow -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

详见:

(tensorflow_venv) songroom@DESKTOP-MEDPUTU:~$ pip install  tensorflow -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
Looking in indexes: http://mirrors.aliyun.com/pypi/simple
Collecting tensorflow
  Downloading http://mirrors.aliyun.com/pypi/packages/5f/85/b9e92264b5b4fb3ecc4c6a71f7a046d7b7cf630e1a8a7d87245386fbdd5a/tensorflow-2.8.0-cp310-cp310-manylinux2010_x86_64.whl (497.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 497.6/497.6 MB 698.7 kB/s eta 0:00:00
Collecting libclang>=9.0.1
  Downloading http://mirrors.aliyun.com/pypi/packages/ab/2f/c6f380aec0b064bccbd81141fecba9862b5634c838f13fff727adc84ceb9/libclang-14.0.1-py2.py3-none-manylinux1_x86_64.whl (14.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.5/14.5 MB 724.5 kB/s eta 0:00:00
Requirement already satisfied: setuptools in ./tensorflow_venv/lib/python3.10/site-packages (from tensorflow) (59.6.0)
Collecting keras-preprocessing>=1.1.1
  Downloading http://mirrors.aliyun.com/pypi/packages/79/4c/7c3275a01e12ef9368a892926ab932b33bb13d55794881e3573482b378a7/Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.6/42.6 KB 422.0 kB/s eta 0:00:00
Collecting tensorflow-io-gcs-filesystem>=0.23.1
  Downloading http://mirrors.aliyun.com/pypi/packages/24/2d/295e62fdf069646d8edfd50d3a643bf8e1520b26ab8c5cc7912df1ea3444/tensorflow_io_gcs_filesystem-0.25.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 768.1 kB/s eta 0:00:00
Collecting gast>=0.2.1
  Downloading http://mirrors.aliyun.com/pypi/packages/5f/1c/b59500a88c5c3d9d601c5ca62b9df5e0964764472faed82a182958a922c5/gast-0.5.3-py3-none-any.whl (19 kB)
Collecting protobuf>=3.9.2
  Downloading http://mirrors.aliyun.com/pypi/packages/4c/be/bdd22d86d24e5b8b08673d80be70d1a72c255f85152ff09b28490904092a/protobuf-3.20.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 759.7 kB/s eta 0:00:00
Requirement already satisfied: numpy>=1.20 in /usr/local/lib/python3.10/dist-packages (from tensorflow) (1.22.3)
Collecting keras<2.9,>=2.8.0rc0
  Downloading http://mirrors.aliyun.com/pypi/packages/4f/2f/eb9391bdcba2693cc8396f244bd3b4512bcd1123c2ea06f4dfcf50dc5ce9/keras-2.8.0-py2.py3-none-any.whl (1.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 643.0 kB/s eta 0:00:00
Collecting absl-py>=0.4.0
  Downloading http://mirrors.aliyun.com/pypi/packages/2c/03/e3e19d3faf430ede32e41221b294e37952e06acc96781c417ac25d4a0324/absl_py-1.0.0-py3-none-any.whl (126 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.7/126.7 KB 715.6 kB/s eta 0:00:00
Collecting grpcio<2.0,>=1.24.3
  Downloading http://mirrors.aliyun.com/pypi/packages/0e/61/2ff6bfb320736ba11f4d9448bf9b5bfe33651249dce4ecb3276cf8a799b7/grpcio-1.45.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 770.6 kB/s eta 0:00:00
Collecting tensorboard<2.9,>=2.8
  Downloading http://mirrors.aliyun.com/pypi/packages/f7/fd/67c61276de025801cfa8a1b9af2d7c577e7f27c17b6bff2baca20bf03543/tensorboard-2.8.0-py3-none-any.whl (5.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.8/5.8 MB 766.2 kB/s eta 0:00:00
Collecting typing-extensions>=3.6.6
  Downloading http://mirrors.aliyun.com/pypi/packages/75/e1/932e06004039dd670c9d5e1df0cd606bf46e29a28e65d5bb28e894ea29c9/typing_extensions-4.2.0-py3-none-any.whl (24 kB)
Collecting google-pasta>=0.1.1
  Downloading http://mirrors.aliyun.com/pypi/packages/a3/de/c648ef6835192e6e2cc03f40b19eeda4382c49b5bafb43d88b931c4c74ac/google_pasta-0.2.0-py3-none-any.whl (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.5/57.5 KB 555.1 kB/s eta 0:00:00
Requirement already satisfied: six>=1.12.0 in /usr/lib/python3/dist-packages (from tensorflow) (1.16.0)
Collecting tf-estimator-nightly==2.8.0.dev2021122109
  Downloading http://mirrors.aliyun.com/pypi/packages/a7/f1/f89e097f377b163856076f167baf149b010df3bbf425d2c06276048e2051/tf_estimator_nightly-2.8.0.dev2021122109-py2.py3-none-any.whl (462 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 462.5/462.5 KB 740.3 kB/s eta 0:00:00
Collecting opt-einsum>=2.3.2
  Downloading http://mirrors.aliyun.com/pypi/packages/bc/19/404708a7e54ad2798907210462fd950c3442ea51acc8790f3da48d2bee8b/opt_einsum-3.3.0-py3-none-any.whl (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 KB 787.1 kB/s eta 0:00:00
Collecting termcolor>=1.1.0
  Downloading http://mirrors.aliyun.com/pypi/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz (3.9 kB)
  Preparing metadata (setup.py) ... done
Collecting astunparse>=1.6.0
  Downloading http://mirrors.aliyun.com/pypi/packages/2b/03/13dde6512ad7b4557eb792fbcf0c653af6076b81e5941d36ec61f7ce6028/astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting wrapt>=1.11.0
  Downloading http://mirrors.aliyun.com/pypi/packages/fd/70/8a133c88a394394dd57159083b86a564247399440b63f2da0ad727593570/wrapt-1.14.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (77 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.9/77.9 KB 710.6 kB/s eta 0:00:00
Collecting h5py>=2.9.0
  Downloading http://mirrors.aliyun.com/pypi/packages/96/2e/1be92623969c1b9df2d839b42db24b616861e988c8eac0340d28d5c45ed4/h5py-3.6.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.5/4.5 MB 782.4 kB/s eta 0:00:00
Collecting flatbuffers>=1.12
  Downloading http://mirrors.aliyun.com/pypi/packages/3d/d0/26033c70d642fbc1e35d3619cf3210986fb953c173b1226709f75056c149/flatbuffers-2.0-py2.py3-none-any.whl (26 kB)
Requirement already satisfied: wheel<1.0,>=0.23.0 in /usr/lib/python3/dist-packages (from astunparse>=1.6.0->tensorflow) (0.37.1)
Collecting tensorboard-data-server<0.7.0,>=0.6.0
  Downloading http://mirrors.aliyun.com/pypi/packages/60/f9/802efd84988bffd9f644c03b6e66fde8e76c3aa33db4279ddd11c5d61f4b/tensorboard_data_server-0.6.1-py3-none-manylinux2010_x86_64.whl (4.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 799.6 kB/s eta 0:00:00
Collecting werkzeug>=0.11.15
  Downloading http://mirrors.aliyun.com/pypi/packages/c4/44/f50f2d22cdfb6d56c03d1b4cc3cfa03ebee2f21b59a7768f151e43415ba5/Werkzeug-2.1.2-py3-none-any.whl (224 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 224.9/224.9 KB 788.3 kB/s eta 0:00:00
Collecting google-auth<3,>=1.6.3
  Downloading http://mirrors.aliyun.com/pypi/packages/fc/04/ea9a945a6fbd7f7f977fcf7e300a715f1635939e5daf141b95068abaa5ec/google_auth-2.6.6-py2.py3-none-any.whl (156 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 156.7/156.7 KB 784.4 kB/s eta 0:00:00
Collecting google-auth-oauthlib<0.5,>=0.4.1
  Downloading http://mirrors.aliyun.com/pypi/packages/b1/0e/0636cc1448a7abc444fb1b3a63655e294e0d2d49092dc3de05241be6d43c/google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)
Collecting tensorboard-plugin-wit>=1.6.0
  Downloading http://mirrors.aliyun.com/pypi/packages/e0/68/e8ecfac5dd594b676c23a7f07ea34c197d7d69b3313afdf8ac1b0a9905a2/tensorboard_plugin_wit-1.8.1-py3-none-any.whl (781 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 781.3/781.3 KB 787.2 kB/s eta 0:00:00
Requirement already satisfied: requests<3,>=2.21.0 in /usr/lib/python3/dist-packages (from tensorboard<2.9,>=2.8->tensorflow) (2.25.1)
Collecting markdown>=2.6.8
  Downloading http://mirrors.aliyun.com/pypi/packages/9f/d4/2c7f83915d437736996b2674300c6c4b578a6f897f34e40f5c04db146719/Markdown-3.3.6-py3-none-any.whl (97 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.8/97.8 KB 763.1 kB/s eta 0:00:00
Collecting cachetools<6.0,>=2.0.0
  Downloading http://mirrors.aliyun.com/pypi/packages/19/99/ace1769546388976b45e93445bb04c6df95e96363f03fbb56f916da5ebde/cachetools-5.0.0-py3-none-any.whl (9.1 kB)
Collecting rsa<5,>=3.1.4
  Downloading http://mirrors.aliyun.com/pypi/packages/30/ab/8fd9e88e6fa5ec41afca995938bbefb72195278e0cfc5bd76a4f29b23fb2/rsa-4.8-py3-none-any.whl (39 kB)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/lib/python3/dist-packages (from google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow) (0.2.1)
Collecting requests-oauthlib>=0.7.0
  Downloading http://mirrors.aliyun.com/pypi/packages/6f/bb/5deac77a9af870143c684ab46a7934038a53eb4aa975bc0687ed6ca2c610/requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Requirement already satisfied: oauthlib>=3.0.0 in /usr/lib/python3/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.9,>=2.8->tensorflow) (3.2.0)
Requirement already satisfied: pyasn1>=0.1.3 in /usr/lib/python3/dist-packages (from rsa<5,>=3.1.4->google-auth<3,>=1.6.3->tensorboard<2.9,>=2.8->tensorflow) (0.4.8)
Building wheels for collected packages: termcolor
  Building wheel for termcolor (setup.py) ... done
  Created wheel for termcolor: filename=termcolor-1.1.0-py3-none-any.whl size=4848 sha256=4f6397e2d1602d93a6896067973924822c24465e8b6028dce7087496d2f4b54f
  Stored in directory: /home/songroom/.cache/pip/wheels/6d/53/68/8653d932b409453034a15bc1b1ebba4364d2c274dcc8adf4b2
Successfully built termcolor
Installing collected packages: tf-estimator-nightly, termcolor, tensorboard-plugin-wit, libclang, keras, flatbuffers, wrapt, werkzeug, typing-extensions, tensorflow-io-gcs-filesystem, tensorboard-data-server, rsa, requests-oauthlib, protobuf, opt-einsum, markdown, keras-preprocessing, h5py, grpcio, google-pasta, gast, cachetools, astunparse, absl-py, google-auth, google-auth-oauthlib, tensorboard, tensorflow
Successfully installed absl-py-1.0.0 astunparse-1.6.3 cachetools-5.0.0 flatbuffers-2.0 gast-0.5.3 google-auth-2.6.6 google-auth-oauthlib-0.4.6 google-pasta-0.2.0 grpcio-1.45.0 h5py-3.6.0 keras-2.8.0 keras-preprocessing-1.1.2 libclang-14.0.1 markdown-3.3.6 opt-einsum-3.3.0 protobuf-3.20.1 requests-oauthlib-1.3.1 rsa-4.8 tensorboard-2.8.0 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 tensorflow-2.8.0 tensorflow-io-gcs-filesystem-0.25.0 termcolor-1.1.0 tf-estimator-nightly-2.8.0.dev2021122109 typing-extensions-4.2.0 werkzeug-2.1.2 wrapt-1.14.1
(tensorflow_venv) songroom@DESKTOP-MEDPUTU:~$ 

验证,成功!

(tensorflow_venv) songroom@DESKTOP-MEDPUTU:~$ python
Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
2022-05-03 07:26:44.071969: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2022-05-03 07:26:44.072042: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
>>> 

更多[关于超时参数设置,其它镜像],请参考:

https://zhuanlan.zhihu.com/p/357516762

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
pip._vendor.urllib3.exceptions.sslerror: [ssl: decryption_failed_or_bad_record_mac]是一个SSL错误,表示解密或记录验证时出现问题SSLSecure Socket Layer)是一种用于加密网络连接的协议,用于确保数据在客户端和服务器之间的安全传输。当客户端与服务器之间的SSL连接出现问题时,就会触发这个异常。 这个错误通常是由于以下原因之一引起的: 1. SSL证书问题:可能是服务器的SSL证书过期、无效或不受信任。在这种情况下,可以尝试更新或重新安装证书,并确保其有效性。 2. 网络问题:可能是由于网络中的某些问题导致数据在传输过程中损坏或丢失。可以尝试重启网络设备或更换网络连接来解决问题。 3. 客户端或服务器配置问题:可能是由于客户端或服务器上的配置错误导致SSL连接失败。可以检查相关的TLS/SSL配置,确保其准确性和一致性。 解决这个问题的方法包括: 1. 检查SSL证书:确保证书有效并受信任。如果不是自签名证书,可以尝试更新或重新安装证书。 2. 检查网络连接:确保网络连接正常,尝试重启网络设备或更换网络连接。 3. 检查配置:检查客户端和服务器上的TLS/SSL配置,确保其正确设置。 4. 使用其他HTTPS库:如果以上方法无法解决问题,可以尝试使用其他的HTTPS库替代pip._vendor.urllib3,例如requests库。 总之,pip._vendor.urllib3.exceptions.sslerror: [ssl: decryption_failed_or_bad_record_mac]是一个SSL错误,可能由于证书问题、网络问题或配置问题引起。通过检查和解决这些问题,可以解决这个错误。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值