ue4-Network相关-变量同步

本文详细介绍了在UE4中如何使用蓝图和C++进行网络变量的同步,包括选择属性Replication的不同选项,如None、Replicated和RepNotify,以及在C++中如何通过标记变量和重写GetLifetimeReplicatedProps方法实现同步。

ue4-Network相关-变量同步:蓝图中同步:选择变量属性 Replication 为 Replicated,有三个可选值。

None:默认值,不会同步给服务端 Replicated:同步给服务端,再同步给其他客户端 RepNotify:选择这个的时候,会 Functions 中生产一个变量 Var 对应的方法 OnRep_Var,在 Var 改变的时候会回调 服务器和所有客户端 中该Actor的这个 OnRep_Var 方法,

参考:https://docs-origin.unrealengine.com/latest/INT/Gameplay/HowTo/Networking/ReplicateVariable/Blueprints/index.html

c++中同步:

在变量中加入标记 Replicated

?

1

2

UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite, Category = AMyNetCharacter)

    int32 Cash;

重写 AActor 的 GetLifetimeReplicatedProps 方法,加入需要同步的变量 Cash

?

1

2

3

4

5

void AMyNetCharacter::GetLifetimeReplicatedProps(TArray<flifetimeproperty>& OutLifetimeProps) const

{

    Super::GetLifetimeReplicatedProps(OutLifetimeProps);

    DOREPLIFETIME(AMyNetCharacter, Cash);

}</flifetimeproperty>

在构造函数中修改成员 bReplicates 为 true

?

1

2

3

4

5

AMyNetCharacter::AMyNetCharacter()

{

    Cash = 456;

    bReplicates = true;

}

变量标记的可选值,和蓝图对应,意思差不多 NotReplicated:不会同步给服务端 Replicated:同步给服务端,在同步给其他客户端

ReplicatedUsing:选择这个的时候,需要指定一个 Var 改变时对应的 OnRep_Var(命名无特殊要求,不过还是按照蓝图生成的规则以 OnRep_ 前缀),在 Var 改变的时候会回调这个 OnRep_Var 方法。规则和 Replicated 差不多,示例如下:

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

UFUNCTION(BlueprintCallable, Category = AMyNetCharacter)

    virtual void OnRep_Money();

 

void AMyNetCharacter::OnRep_Money()

{

    FString msg = FString::Printf(TEXT("--- OnRep_Money money:%d"), Money);

    GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, *msg);

}

 

    // 指定回调函数为 OnRep_Money

    UPROPERTY(ReplicatedUsing = OnRep_Money, EditAnywhere, BlueprintReadWrite, Category = AMyNetCharacter)

        int32 Money;

 

    //重写的 GetLifetimeReplicatedProps 方法中加入需要同步的变量

    DOREPLIFETIME(AMyNetCharacter, Money);

hanxu@hanxu-OptiPlex-7090:~/桌面/carla-ue4-dev$ make PythonAPI ARGS="--python-version=3.10" parse-options: 未识别的选项 "--python-version=3.10" BuildUE4Plugins.sh: Downloading STREETMAP plugin. HEAD 目前位于 260273d Correct descriptor BuildUE4Plugins.sh: StreetMap Success! Setup.sh: Generating CMake configuration files. Setup.sh: boost-1.84.0-c10 already installed. Setup.sh: rpclib-carla-callbacks-c10 already installed. Setup.sh: gtest-1.8.1-c10 already installed. Setup.sh: recast-c10 already installed. Setup.sh: Libpng already installed. Setup.sh: Xerces-c already installed. Setup.sh: Eigen already installed. Setup.sh: Sqlite already installed. Setup.sh: PROJ already installed. Setup.sh: Patchelf already installed. fatal: 不是 git 仓库(或者任何父目录):.git fatal: 不是 git 仓库(或者任何父目录):.git fatal: 不是 git 仓库(或者任何父目录):.git Setup.sh: CARLA version -dirty. Setup.sh: Success! parse-options: 未识别的选项 "--python-version=3.10" BuildLibCarla.sh: Building LibCarla "Client.Release" configuration. ninja: no work to do. [0/1] Install the project... -- Install configuration: "Client" BuildLibCarla.sh: Success! parse-options: 未识别的选项 "--python-version=3.10" BuildOSM2ODR.sh: Building OSM2ODR. -- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong. -- CMAKE_BINARY_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build -- CMAKE_SOURCE_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-source -- -- Platform: -- Host: Linux-6.8.0-87-generic x86_64 -- Target: Linux-6.8.0-87-generic x86_64 -- CMake: 3.22.1 -- CMake generator: Ninja -- CMake build tool: /usr/bin/ninja -- Compiler: Clang 10.0.1 -- -- Found Proj: /home/hanxu/桌面/carla-ue4-dev/Build/proj-install/lib/libproj.a -- Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB) -- Enabled features: Linux-6.8.0-87-generic x86_64 Clang 10.0.1 Release Proj -- Configuring done -- Generating done -- Build files have been written to: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build ninja: no work to do. [0/1] Install the project... -- Install configuration: "Release" -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/PythonAPI/carla/dependencies/lib/libosm2odr.a -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/PythonAPI/carla/dependencies/include/OSM2ODR.h /home/hanxu/UnrealEngine_4.26/Engine/Source/ThirdParty/Linux/LibCxx/include/c++/v1 /home/hanxu/UnrealEngine_4.26/Engine/Source/ThirdParty/Linux/LibCxx/lib/Linux/x86_64-unknown-linux-gnu -- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong. -- CMAKE_BINARY_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build-server -- CMAKE_SOURCE_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-source -- -- Platform: -- Host: Linux-6.8.0-87-generic x86_64 -- Target: Linux-6.8.0-87-generic x86_64 -- CMake: 3.22.1 -- CMake generator: Ninja -- CMake build tool: /usr/bin/ninja -- Compiler: Clang 10.0.1 -- -- Found Proj: /home/hanxu/桌面/carla-ue4-dev/Build/proj-install-server/lib/libproj.a -- Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB) -- Enabled features: Linux-6.8.0-87-generic x86_64 Clang 10.0.1 Release Proj -- Configuring done -- Generating done -- Build files have been written to: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build-server ninja: no work to do. [0/1] Install the project... -- Install configuration: "Release" -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/Unreal/CarlaUE4/Plugins/Carla/CarlaDependencies/lib/libosm2odr.a -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/Unreal/CarlaUE4/Plugins/Carla/CarlaDependencies/include/OSM2ODR.h -- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong. -- CMAKE_BINARY_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build-server -- CMAKE_SOURCE_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-source -- -- Platform: -- Host: Linux-6.8.0-87-generic x86_64 -- Target: Linux-6.8.0-87-generic x86_64 -- CMake: 3.22.1 -- CMake generator: Ninja -- CMake build tool: /usr/bin/ninja -- Compiler: Clang 10.0.1 -- -- Found Proj: /home/hanxu/桌面/carla-ue4-dev/Build/proj-install-server/lib/libproj.a -- Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB) -- Enabled features: Linux-6.8.0-87-generic x86_64 Clang 10.0.1 Release Proj -- Configuring done -- Generating done -- Build files have been written to: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build-server ninja: no work to do. [0/1] Install the project... -- Install configuration: "Release" -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/Unreal/CarlaUE4/Plugins/Carla/CarlaDependencies/lib/libosm2odr.a -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/Unreal/CarlaUE4/Plugins/Carla/CarlaDependencies/include/OSM2ODR.h BuildOSM2ODR.sh: OSM2ODR Success! BuildPythonAPI.sh: Building Python API wheel for Python 3.10. * Creating venv isolated environment... * Installing packages in isolated environment... (distro, setuptools, wheel) Collecting distro Downloading distro-1.9.0-py3-none-any.whl (20 kB) Collecting wheel Downloading wheel-0.45.1-py3-none-any.whl (72 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.5/72.5 KB 9.9 kB/s eta 0:00:00 Collecting setuptools Downloading setuptools-80.9.0-py3-none-any.whl (1.2 MB) ━━━━━━━━━━━━━━━╸ 0.5/1.2 MB 8.7 kB/s eta 0:01:24 ERROR: Exception: Traceback (most recent call last): File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher yield File "/tmp/build-env-6y9nh47d/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 "/tmp/build-env-6y9nh47d/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 466, 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 1303, in recv_into return self.read(nbytes, buffer) File "/usr/lib/python3.10/ssl.py", line 1159, in read return self._sslobj.read(len, buffer) TimeoutError: The read operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 165, in exc_logging_wrapper status = run_func(*args) File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper return func(self, options, args) File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 339, in run requirement_set = resolver.resolve( File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve result = self._result = resolver.resolve( File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "/tmp/build-env-6y9nh47d/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 "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria if not criterion.candidates: File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__ return bool(self._sequence) File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__ return any(self) File "/tmp/build-env-6y9nh47d/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 "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built candidate = func() File "/tmp/build-env-6y9nh47d/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 "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 288, in __init__ super().__init__( File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in __init__ self.dist = self._prepare() File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare dist = self._prepare_distribution() File "/tmp/build-env-6y9nh47d/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 "/tmp/build-env-6y9nh47d/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 "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 532, in _prepare_linked_requirement local_file = unpack_url( File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 214, in unpack_url file = get_http_url( File "/tmp/build-env-6y9nh47d/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 "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/network/download.py", line 146, in __call__ for chunk in chunks: File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/cli/progress_bars.py", line 304, in _rich_progress_bar for chunk in iterable: File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_internal/network/utils.py", line 63, in response_chunks for chunk in response.raw.stream( File "/tmp/build-env-6y9nh47d/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 576, in stream data = self.read(amt=amt, decode_content=decode_content) File "/tmp/build-env-6y9nh47d/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 "/tmp/build-env-6y9nh47d/lib/python3.10/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. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/build/__main__.py", line 372, in main built = build_call( File "/usr/lib/python3/dist-packages/build/__main__.py", line 202, in build_package out = _build(isolation, builder, outdir, distribution, config_settings, skip_dependency_check) File "/usr/lib/python3/dist-packages/build/__main__.py", line 140, in _build return _build_in_isolated_env(builder, outdir, distribution, config_settings) File "/usr/lib/python3/dist-packages/build/__main__.py", line 108, in _build_in_isolated_env env.install(builder.build_system_requires) File "/usr/lib/python3/dist-packages/build/env.py", line 211, in install _subprocess(cmd) File "/usr/lib/python3/dist-packages/build/env.py", line 81, in _subprocess raise e File "/usr/lib/python3/dist-packages/build/env.py", line 78, in _subprocess subprocess.check_output(cmd, stderr=subprocess.STDOUT) File "/usr/lib/python3.10/subprocess.py", line 421, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/tmp/build-env-6y9nh47d/bin/python', '-Im', 'pip', 'install', '--use-pep517', '--no-warn-script-location', '-r', '/tmp/build-reqs-temjmr2u.txt']' returned non-zero exit status 2. ERROR Command '['/tmp/build-env-6y9nh47d/bin/python', '-Im', 'pip', 'install', '--use-pep517', '--no-warn-script-location', '-r', '/tmp/build-reqs-temjmr2u.txt']' returned non-zero exit status 2. make: *** [Util/BuildTools/Linux.mk:89:PythonAPI] 错误 1 hanxu@hanxu-OptiPlex-7090:~/桌面/carla-ue4-dev$ make PythonAPI BuildUE4Plugins.sh: Downloading STREETMAP plugin. HEAD 目前位于 260273d Correct descriptor BuildUE4Plugins.sh: StreetMap Success! Setup.sh: Generating CMake configuration files. Setup.sh: boost-1.84.0-c10 already installed. Setup.sh: rpclib-carla-callbacks-c10 already installed. Setup.sh: gtest-1.8.1-c10 already installed. Setup.sh: recast-c10 already installed. Setup.sh: Libpng already installed. Setup.sh: Xerces-c already installed. Setup.sh: Eigen already installed. Setup.sh: Sqlite already installed. Setup.sh: PROJ already installed. Setup.sh: Patchelf already installed. fatal: 不是 git 仓库(或者任何父目录):.git fatal: 不是 git 仓库(或者任何父目录):.git fatal: 不是 git 仓库(或者任何父目录):.git Setup.sh: CARLA version -dirty. Setup.sh: Success! BuildLibCarla.sh: Building LibCarla "Client.Release" configuration. ninja: no work to do. [0/1] Install the project... -- Install configuration: "Client" BuildLibCarla.sh: Success! BuildOSM2ODR.sh: Building OSM2ODR. -- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong. -- CMAKE_BINARY_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build -- CMAKE_SOURCE_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-source -- -- Platform: -- Host: Linux-6.8.0-87-generic x86_64 -- Target: Linux-6.8.0-87-generic x86_64 -- CMake: 3.22.1 -- CMake generator: Ninja -- CMake build tool: /usr/bin/ninja -- Compiler: Clang 10.0.1 -- -- Found Proj: /home/hanxu/桌面/carla-ue4-dev/Build/proj-install/lib/libproj.a -- Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB) -- Enabled features: Linux-6.8.0-87-generic x86_64 Clang 10.0.1 Release Proj -- Configuring done -- Generating done -- Build files have been written to: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build ninja: no work to do. [0/1] Install the project... -- Install configuration: "Release" -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/PythonAPI/carla/dependencies/lib/libosm2odr.a -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/PythonAPI/carla/dependencies/include/OSM2ODR.h /home/hanxu/UnrealEngine_4.26/Engine/Source/ThirdParty/Linux/LibCxx/include/c++/v1 /home/hanxu/UnrealEngine_4.26/Engine/Source/ThirdParty/Linux/LibCxx/lib/Linux/x86_64-unknown-linux-gnu -- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong. -- CMAKE_BINARY_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build-server -- CMAKE_SOURCE_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-source -- -- Platform: -- Host: Linux-6.8.0-87-generic x86_64 -- Target: Linux-6.8.0-87-generic x86_64 -- CMake: 3.22.1 -- CMake generator: Ninja -- CMake build tool: /usr/bin/ninja -- Compiler: Clang 10.0.1 -- -- Found Proj: /home/hanxu/桌面/carla-ue4-dev/Build/proj-install-server/lib/libproj.a -- Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB) -- Enabled features: Linux-6.8.0-87-generic x86_64 Clang 10.0.1 Release Proj -- Configuring done -- Generating done -- Build files have been written to: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build-server ninja: no work to do. [0/1] Install the project... -- Install configuration: "Release" -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/Unreal/CarlaUE4/Plugins/Carla/CarlaDependencies/lib/libosm2odr.a -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/Unreal/CarlaUE4/Plugins/Carla/CarlaDependencies/include/OSM2ODR.h -- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong. -- CMAKE_BINARY_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build-server -- CMAKE_SOURCE_DIR: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-source -- -- Platform: -- Host: Linux-6.8.0-87-generic x86_64 -- Target: Linux-6.8.0-87-generic x86_64 -- CMake: 3.22.1 -- CMake generator: Ninja -- CMake build tool: /usr/bin/ninja -- Compiler: Clang 10.0.1 -- -- Found Proj: /home/hanxu/桌面/carla-ue4-dev/Build/proj-install-server/lib/libproj.a -- Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB) -- Enabled features: Linux-6.8.0-87-generic x86_64 Clang 10.0.1 Release Proj -- Configuring done -- Generating done -- Build files have been written to: /home/hanxu/桌面/carla-ue4-dev/Build/libosm2dr-build-server ninja: no work to do. [0/1] Install the project... -- Install configuration: "Release" -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/Unreal/CarlaUE4/Plugins/Carla/CarlaDependencies/lib/libosm2odr.a -- Up-to-date: /home/hanxu/桌面/carla-ue4-dev/Unreal/CarlaUE4/Plugins/Carla/CarlaDependencies/include/OSM2ODR.h BuildOSM2ODR.sh: OSM2ODR Success! BuildPythonAPI.sh: Building Python API wheel for Python 3. * Creating venv isolated environment... * Installing packages in isolated environment... (distro, setuptools, wheel) WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, '连接被对方重置'))': /simple/wheel/ Collecting wheel Using cached wheel-0.45.1-py3-none-any.whl (72 kB) Collecting setuptools Downloading setuptools-80.9.0-py3-none-any.whl (1.2 MB) ━━━━━━╸ 0.2/1.2 MB 18.3 kB/s eta 0:00:55 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. setuptools from https://files.pythonhosted.org/packages/a3/dc/17031897dae0efacfea57dfd3a82fdd2a2aeb58e0ff71b77b87e44edc772/setuptools-80.9.0-py3-none-any.whl#sha256=062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 (from -r /tmp/build-reqs-yvoes9l5.txt (line 2)): Expected sha256 062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 Got 7914852f8c529b1ae08a5182c18a1f3d3c51969f48c4acfddcd95bc2d623829c Traceback (most recent call last): File "/usr/lib/python3/dist-packages/build/__main__.py", line 372, in main built = build_call( File "/usr/lib/python3/dist-packages/build/__main__.py", line 202, in build_package out = _build(isolation, builder, outdir, distribution, config_settings, skip_dependency_check) File "/usr/lib/python3/dist-packages/build/__main__.py", line 140, in _build return _build_in_isolated_env(builder, outdir, distribution, config_settings) File "/usr/lib/python3/dist-packages/build/__main__.py", line 108, in _build_in_isolated_env env.install(builder.build_system_requires) File "/usr/lib/python3/dist-packages/build/env.py", line 211, in install _subprocess(cmd) File "/usr/lib/python3/dist-packages/build/env.py", line 81, in _subprocess raise e File "/usr/lib/python3/dist-packages/build/env.py", line 78, in _subprocess subprocess.check_output(cmd, stderr=subprocess.STDOUT) File "/usr/lib/python3.10/subprocess.py", line 421, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/tmp/build-env-7hydqfk7/bin/python', '-Im', 'pip', 'install', '--use-pep517', '--no-warn-script-location', '-r', '/tmp/build-reqs-yvoes9l5.txt']' returned non-zero exit status 1. ERROR Command '['/tmp/build-env-7hydqfk7/bin/python', '-Im', 'pip', 'install', '--use-pep517', '--no-warn-script-location', '-r', '/tmp/build-reqs-yvoes9l5.txt']' returned non-zero exit status 1. make: *** [Util/BuildTools/Linux.mk:89:PythonAPI] 错误 1
最新发布
12-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值