【py2.7老版本无法正常pip】【tensorflow has an invalid wheel, .dist-info directory ‘tensorflow‘】

针对pip库20.x版本的Bug,导致tensorflow安装时出现无效wheel的问题,建议从各网站下载对应Python版本的.whl文件,然后通过pip在指定路径下安装。如果遇到错误,可尝试将pip回退到19.x版本进行修复。
部署运行你感兴趣的模型镜像

解决方法:

1、到各种网站下载对应py版本的.whl文件

2、到对应路径下pip install .whl文件即可(如果不知道路径可以先pip一次,系统会报错告诉你路径)

3、tensorflow has an invalid wheel, .dist-info directory 'tensorflow'

原因:pip库有问题(20.x版本的Bug),没有维护老版本的whl安装,可以回退到19.x版本

pip install -U pip==19

您可能感兴趣的与本文相关的镜像

TensorFlow-v2.15

TensorFlow-v2.15

TensorFlow

TensorFlow 是由Google Brain 团队开发的开源机器学习框架,广泛应用于深度学习研究和生产环境。 它提供了一个灵活的平台,用于构建和训练各种机器学习模型

Created wheel for lit: filename=lit-15.0.7-py3-none-any.whl size=90005 sha256=d5e10a787d053c88b363a3077c005e0f8a63959f4fa4da2d1966b677aa348967 Stored in directory: /home/u/.cache/pip/wheels/27/2c/b6/3ed2983b1b44fe0dea1bb35234b09f2c22fb8ebb308679c922 Successfully built lit ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/_internal/utils/wheel.py", line 73, in read_wheel_metadata_file return source.read(path) File "/usr/lib/python3.10/zipfile.py", line 1487, in read return fp.read() File "/usr/lib/python3.10/zipfile.py", line 916, in read buf += self._read1(self.MAX_N) File "/usr/lib/python3.10/zipfile.py", line 1020, in _read1 self._update_crc(data) File "/usr/lib/python3.10/zipfile.py", line 948, in _update_crc raise BadZipFile("Bad CRC-32 for file %r" % self.name) zipfile.BadZipFile: Bad CRC-32 for file 'torch-2.0.0+cu118.dist-info/RECORD' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/_internal/metadata/pkg_resources.py", line 107, in from_wheel metadata_text = { File "/usr/lib/python3/dist-packages/pip/_internal/metadata/pkg_resources.py", line 108, in <dictcomp> path.split("/", 1)[-1]: read_wheel_metadata_file(zf, path) File "/usr/lib/python3/dist-packages/pip/_internal/utils/wheel.py", line 77, in read_wheel_metadata_file raise UnsupportedWheel(f"could not read {path!r} file: {e!r}") pip._internal.exceptions.UnsupportedWheel: could not read 'torch-2.0.0+cu118.dist-info/RECORD' file: BadZipFile("Bad CRC-32 for file 'torch-2.0.0+cu118.dist-info/RECORD'") During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 529, in _determine_conflicts return check_install_conflicts(to_install) File "/usr/lib/python3/dist-packages/pip/_internal/operations/check.py", line 103, in check_install_conflicts would_be_installed = _simulate_installation_of(to_install, package_set) File "/usr/lib/python3/dist-packages/pip/_internal/operations/check.py", line 126, in _simulate_installation_of dist = abstract_dist.get_metadata_distribution() File "/usr/lib/python3/dist-packages/pip/_internal/distributions/wheel.py", line 26, in get_metadata_distribution return get_wheel_distribution(wheel, canonicalize_name(self.req.name)) File "/usr/lib/python3/dist-packages/pip/_internal/metadata/__init__.py", line 62, in get_wheel_distribution return Distribution.from_wheel(wheel, canonical_name) File "/usr/lib/python3/dist-packages/pip/_internal/metadata/pkg_resources.py", line 115, in from_wheel raise UnsupportedWheel(f"{name} has an invalid wheel, {e}") pip._internal.exceptions.UnsupportedWheel: torch has an invalid wheel, could not read 'torch-2.0.0+cu118.dist-info/RECORD' file: BadZipFile("Bad CRC-32 for file 'torch-2.0.0+cu118.dist-info/RECORD'") Installing collected packages: mpmath, lit, cmake, typing-extensions, sympy, numpy, networkx, jinja2, filelock, triton, torch, torchvision, torchaudio WARNING: The script lit is installed in '/home/u/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ERROR: Exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 165, in exc_logging_wrapper status = run_func(*args) File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 205, in wrapper return func(self, options, args) File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 405, in run installed = install_given_reqs( File "/usr/lib/python3/dist-packages/pip/_internal/req/__init__.py", line 73, in install_given_reqs requirement.install( File "/usr/lib/python3/dist-packages/pip/_internal/req/req_install.py", line 769, in install install_wheel( File "/usr/lib/python3/dist-packages/pip/_internal/operations/install/wheel.py", line 729, in install_wheel _install_wheel( File "/usr/lib/python3/dist-packages/pip/_internal/operations/install/wheel.py", line 589, in _install_wheel file.save() File "/usr/lib/python3/dist-packages/pip/_internal/operations/install/wheel.py", line 390, in save shutil.copyfileobj(f, dest) File "/usr/lib/python3.10/shutil.py", line 195, in copyfileobj buf = fsrc_read(length) File "/usr/lib/python3.10/zipfile.py", line 930, in read data = self._read1(n) File "/usr/lib/python3.10/zipfile.py", line 1020, in _read1 self._update_crc(data) File "/usr/lib/python3.10/zipfile.py", line 948, in _update_crc raise BadZipFile("Bad CRC-32 for file %r" % self.name) zipfile.BadZipFile: Bad CRC-32 for file 'cmake/data/share/cmake-3.25/Modules/CPack.cmake'
06-13
Linux raspberrypi 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sat Aug 2 22:18:37 2025 from 192.168.163.80 w@raspberrypi:~ $ pip install dronekit error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. w@raspberrypi:~ $ conda create -n dronepy27 python=2.7 -bash: conda: command not found w@raspberrypi:~ $ conda create -n dronepy27 python=2.7 -bash: conda: command not found w@raspberrypi:~ $ sudo apt-get install python-pip python-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-pip is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python3-pip Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python-dev-is-python3 E: Package 'python-pip' has no installation candidate E: Package 'python-dev' has no installation candidate w@raspberrypi:~ $ sudo apt-get install python-pip python-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-pip is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python3-pip Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python-dev-is-python3 E: Package 'python-pip' has no installation candidate E: Package 'python-dev' has no installation candidate w@raspberrypi:~ $ ^C w@raspberrypi:~ $ sudo apt-get install python2.7 Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'libpython2.7:armhf' for regex 'python2.7' The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. w@raspberrypi:~ $ sudo apt-get install python-pip python-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-pip is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python3-pip Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python-dev-is-python3 E: Package 'python-pip' has no installation candidate E: Package 'python-dev' has no installation candidate w@raspberrypi:~ $ sudo pip install dronekit error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. w@raspberrypi:~ $ sudo apt-get install python-pip python-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-pip is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python3-pip Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python-dev-is-python3 E: Package 'python-pip' has no installation candidate E: Package 'python-dev' has no installation candidate w@raspberrypi:~ $ sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev python-py Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package python-py w@raspberrypi:~ $ cd w@raspberrypi:~ $ sudo apt-get install python-pip Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-pip is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python3-pip E: Package 'python-pip' has no installation candidate w@raspberrypi:~ $ sudo apt-get install python-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python-dev-is-python3 E: Package 'python-dev' has no installation candidate w@raspberrypi:~ $ sudo apt-get install libxml2-dev libxslt1-dev zlib1g-dev python-py Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package python-py w@raspberrypi:~ $ sudo apt update Hit:1 https://packages.microsoft.com/repos/code stable InRelease Hit:2 http://archive.raspberrypi.com/debian bookworm InRelease Hit:3 http://deb.debian.org/debian bookworm InRelease Hit:4 http://deb.debian.org/debian-security bookworm-security InRelease Get:5 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB] Fetched 55.4 kB in 13s (4,374 B/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done 4 packages can be upgraded. Run 'apt list --upgradable' to see them. w@raspberrypi:~ $ sudo apt install python3-pip python3-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done python3-pip is already the newest version (23.0.1+dfsg-1+rpt1). python3-dev is already the newest version (3.11.2-1+b1). The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. w@raspberrypi:~ $ sudo apt install python-is-python3 Reading package lists... Done Building dependency tree... Done Reading state information... Done python-is-python3 is already the newest version (3.11.2-1+deb12u1). The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. w@raspberrypi:~ $ sudo pip install dronekit error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. w@raspberrypi:~ $ ^C w@raspberrypi:~ $ pip --version pip 23.0.1 from /usr/lib/python3/dist-packages/pip (python 3.11) w@raspberrypi:~ $ sudo apt install -y \ > build-essential \ > python3-dev \ libxml2-dev \ libxslt1-dev \ libgeos-dev \ libproj-dev \ libssl-dev \ zlib1g-dev \ libffi-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package w@raspberrypi:~ $ sudo apt update sudo apt install -y \ build-essential \ python3-dev \ libxml2-dev \ libxslt1-dev \ libgeos-dev \ libproj-dev \ libssl-dev \ zlib1g-dev \ libffi-dev Hit:1 https://packages.microsoft.com/repos/code stable InRelease Hit:2 http://deb.debian.org/debian bookworm InRelease Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease Hit:4 http://deb.debian.org/debian bookworm-updates InRelease Hit:5 http://archive.raspberrypi.com/debian bookworm InRelease Reading package lists... Done Building dependency tree... Done Reading state information... Done 4 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Done Building dependency tree... Done Reading state information... Done build-essential is already the newest version (12.9). python3-dev is already the newest version (3.11.2-1+b1). libxml2-dev is already the newest version (2.9.14+dfsg-1.3~deb12u2). libxslt1-dev is already the newest version (1.1.35-1+deb12u1). libssl-dev is already the newest version (3.0.17-1~deb12u1). zlib1g-dev is already the newest version (1:1.2.13.dfsg-1+rpt1). The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libcurl4-gnutls-dev libdeflate-dev libgeos-c1v5 libgeos3.11.1 libjbig-dev libjpeg-dev libjpeg62-turbo-dev liblerc-dev liblzma-dev libproj25 libsqlite3-dev libtiff-dev libtiffxx6 libwebp-dev libzstd-dev proj-data Suggested packages: libcurl4-doc libgnutls28-dev libidn-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev libgdal-doc liblzma-doc proj-bin sqlite3-doc The following NEW packages will be installed: libcurl4-gnutls-dev libdeflate-dev libffi-dev libgeos-c1v5 libgeos-dev libgeos3.11.1 libjbig-dev libjpeg-dev libjpeg62-turbo-dev liblerc-dev liblzma-dev libproj-dev libproj25 libsqlite3-dev libtiff-dev libtiffxx6 libwebp-dev libzstd-dev proj-data 0 upgraded, 19 newly installed, 0 to remove and 4 not upgraded. Need to get 11.9 MB of archives. After this operation, 43.5 MB of additional disk space will be used. Get:1 http://deb.debian.org/debian bookworm/main arm64 libcurl4-gnutls-dev arm64 7.88.1-10+deb12u12 [472 kB] Get:2 http://deb.debian.org/debian bookworm/main arm64 libdeflate-dev arm64 1.14-1 [50.0 kB] Get:3 http://deb.debian.org/debian bookworm/main arm64 libffi-dev arm64 3.4.4-1 [56.0 kB] Get:4 http://deb.debian.org/debian bookworm/main arm64 libgeos3.11.1 arm64 3.11.1-1 [683 kB] Get:5 http://deb.debian.org/debian bookworm/main arm64 libgeos-c1v5 arm64 3.11.1-1 [75.6 kB] Get:6 http://deb.debian.org/debian bookworm/main arm64 libgeos-dev arm64 3.11.1-1 [52.4 kB] Get:7 http://deb.debian.org/debian bookworm/main arm64 libjbig-dev arm64 2.1-6.1 [29.9 kB] Get:8 http://deb.debian.org/debian bookworm/main arm64 libjpeg62-turbo-dev arm64 1:2.1.5-2 [292 kB] Get:9 http://deb.debian.org/debian bookworm/main arm64 libjpeg-dev arm64 1:2.1.5-2 [71.8 kB] Get:10 http://deb.debian.org/debian bookworm/main arm64 liblerc-dev arm64 4.0.0+ds-2 [146 kB] Get:11 http://deb.debian.org/debian bookworm/main arm64 liblzma-dev arm64 5.4.1-1 [255 kB] Get:12 http://deb.debian.org/debian bookworm/main arm64 proj-data all 9.1.1-1 [6,212 kB] Get:13 http://deb.debian.org/debian bookworm/main arm64 libproj25 arm64 9.1.1-1+b1 [1,102 kB] Get:14 http://deb.debian.org/debian bookworm/main arm64 libsqlite3-dev arm64 3.40.1-2+deb12u1 [979 kB] Get:15 http://deb.debian.org/debian bookworm/main arm64 libzstd-dev arm64 1.5.4+dfsg2-5 [317 kB] Get:16 http://deb.debian.org/debian bookworm/main arm64 libwebp-dev arm64 1.2.4-0.2+deb12u1 [377 kB] Get:17 http://deb.debian.org/debian bookworm/main arm64 libtiffxx6 arm64 4.5.0-6+deb12u2 [144 kB] Get:18 http://deb.debian.org/debian bookworm/main arm64 libtiff-dev arm64 4.5.0-6+deb12u2 [441 kB] Get:19 http://deb.debian.org/debian bookworm/main arm64 libproj-dev arm64 9.1.1-1+b1 [128 kB] Fetched 11.9 MB in 11min 56s (16.6 kB/s) Selecting previously unselected package libcurl4-gnutls-dev:arm64. (Reading database ... 157355 files and directories currently installed.) Preparing to unpack .../00-libcurl4-gnutls-dev_7.88.1-10+deb12u12_arm64.deb ... Unpacking libcurl4-gnutls-dev:arm64 (7.88.1-10+deb12u12) ... Selecting previously unselected package libdeflate-dev:arm64. Preparing to unpack .../01-libdeflate-dev_1.14-1_arm64.deb ... Unpacking libdeflate-dev:arm64 (1.14-1) ... Selecting previously unselected package libffi-dev:arm64. Preparing to unpack .../02-libffi-dev_3.4.4-1_arm64.deb ... Unpacking libffi-dev:arm64 (3.4.4-1) ... Selecting previously unselected package libgeos3.11.1:arm64. Preparing to unpack .../03-libgeos3.11.1_3.11.1-1_arm64.deb ... Unpacking libgeos3.11.1:arm64 (3.11.1-1) ... Selecting previously unselected package libgeos-c1v5:arm64. Preparing to unpack .../04-libgeos-c1v5_3.11.1-1_arm64.deb ... Unpacking libgeos-c1v5:arm64 (3.11.1-1) ... Selecting previously unselected package libgeos-dev. Preparing to unpack .../05-libgeos-dev_3.11.1-1_arm64.deb ... Unpacking libgeos-dev (3.11.1-1) ... Selecting previously unselected package libjbig-dev:arm64. Preparing to unpack .../06-libjbig-dev_2.1-6.1_arm64.deb ... Unpacking libjbig-dev:arm64 (2.1-6.1) ... Selecting previously unselected package libjpeg62-turbo-dev:arm64. Preparing to unpack .../07-libjpeg62-turbo-dev_1%3a2.1.5-2_arm64.deb ... Unpacking libjpeg62-turbo-dev:arm64 (1:2.1.5-2) ... Selecting previously unselected package libjpeg-dev:arm64. Preparing to unpack .../08-libjpeg-dev_1%3a2.1.5-2_arm64.deb ... Unpacking libjpeg-dev:arm64 (1:2.1.5-2) ... Selecting previously unselected package liblerc-dev:arm64. Preparing to unpack .../09-liblerc-dev_4.0.0+ds-2_arm64.deb ... Unpacking liblerc-dev:arm64 (4.0.0+ds-2) ... Selecting previously unselected package liblzma-dev:arm64. Preparing to unpack .../10-liblzma-dev_5.4.1-1_arm64.deb ... Unpacking liblzma-dev:arm64 (5.4.1-1) ... Selecting previously unselected package proj-data. Preparing to unpack .../11-proj-data_9.1.1-1_all.deb ... Unpacking proj-data (9.1.1-1) ... Selecting previously unselected package libproj25:arm64. Preparing to unpack .../12-libproj25_9.1.1-1+b1_arm64.deb ... Unpacking libproj25:arm64 (9.1.1-1+b1) ... Selecting previously unselected package libsqlite3-dev:arm64. Preparing to unpack .../13-libsqlite3-dev_3.40.1-2+deb12u1_arm64.deb ... Unpacking libsqlite3-dev:arm64 (3.40.1-2+deb12u1) ... Selecting previously unselected package libzstd-dev:arm64. Preparing to unpack .../14-libzstd-dev_1.5.4+dfsg2-5_arm64.deb ... Unpacking libzstd-dev:arm64 (1.5.4+dfsg2-5) ... Selecting previously unselected package libwebp-dev:arm64. Preparing to unpack .../15-libwebp-dev_1.2.4-0.2+deb12u1_arm64.deb ... Unpacking libwebp-dev:arm64 (1.2.4-0.2+deb12u1) ... Selecting previously unselected package libtiffxx6:arm64. Preparing to unpack .../16-libtiffxx6_4.5.0-6+deb12u2_arm64.deb ... Unpacking libtiffxx6:arm64 (4.5.0-6+deb12u2) ... Selecting previously unselected package libtiff-dev:arm64. Preparing to unpack .../17-libtiff-dev_4.5.0-6+deb12u2_arm64.deb ... Unpacking libtiff-dev:arm64 (4.5.0-6+deb12u2) ... Selecting previously unselected package libproj-dev:arm64. Preparing to unpack .../18-libproj-dev_9.1.1-1+b1_arm64.deb ... Unpacking libproj-dev:arm64 (9.1.1-1+b1) ... Setting up libzstd-dev:arm64 (1.5.4+dfsg2-5) ... Setting up proj-data (9.1.1-1) ... Setting up libgeos3.11.1:arm64 (3.11.1-1) ... Setting up libproj25:arm64 (9.1.1-1+b1) ... Setting up libjbig-dev:arm64 (2.1-6.1) ... Setting up libcurl4-gnutls-dev:arm64 (7.88.1-10+deb12u12) ... Setting up libffi-dev:arm64 (3.4.4-1) ... Setting up libwebp-dev:arm64 (1.2.4-0.2+deb12u1) ... Setting up libsqlite3-dev:arm64 (3.40.1-2+deb12u1) ... Setting up libjpeg62-turbo-dev:arm64 (1:2.1.5-2) ... Setting up libgeos-c1v5:arm64 (3.11.1-1) ... Setting up liblerc-dev:arm64 (4.0.0+ds-2) ... Setting up liblzma-dev:arm64 (5.4.1-1) ... Setting up libtiffxx6:arm64 (4.5.0-6+deb12u2) ... Setting up libdeflate-dev:arm64 (1.14-1) ... Setting up libjpeg-dev:arm64 (1:2.1.5-2) ... Setting up libtiff-dev:arm64 (4.5.0-6+deb12u2) ... Setting up libgeos-dev (3.11.1-1) ... Setting up libproj-dev:arm64 (9.1.1-1+b1) ... Processing triggers for man-db (2.11.2-2) ... Processing triggers for libc-bin (2.36-9+rpt2+deb12u12) ... w@raspberrypi:~ $ sudo apt install python3-dronekit Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package python3-dronekit w@raspberrypi:~ $ sudo pip3 install --no-cache-dir --upgrade setuptools wheel error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. w@raspberrypi:~ $ sudo pip3 install --no-cache-dir dronekit error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. w@raspberrypi:~ $ sudo apt install -y build-essential python3-dev python3-venv Reading package lists... Done Building dependency tree... Done Reading state information... Done build-essential is already the newest version (12.9). python3-dev is already the newest version (3.11.2-1+b1). python3-venv is already the newest version (3.11.2-1+b1). The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. w@raspberrypi:~ $ python3 -m venv --system-site-packages ~/dronekit_safe_env w@raspberrypi:~ $ source ~/dronekit_safe_env/bin/activate (dronekit_safe_env) w@raspberrypi:~ $ pip install --no-cache-dir --upgrade pip setuptools wheel cython Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: pip in ./dronekit_safe_env/lib/python3.11/site-packages (23.0.1) Collecting pip Downloading pip-25.2-py3-none-any.whl (1.8 MB) ━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 21.6 kB/s eta 0:00:00 Requirement already satisfied: setuptools in ./dronekit_safe_env/lib/python3.11/site-packages (66.1.1) Collecting setuptools Downloading setuptools-80.9.0-py3-none-any.whl (1.2 MB) ━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 23.3 kB/s eta 0:00:00 Requirement already satisfied: wheel in /usr/lib/python3/dist-packages (0.38.4) Collecting wheel Downloading https://www.piwheels.org/simple/wheel/wheel-0.45.1-py3-none-any.whl (72 kB) ━━━━━━━━━━━━━━━━━━ 72.5/72.5 kB 119.9 kB/s eta 0:00:00 Collecting cython Downloading cython-3.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.1 MB) ━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 24.2 kB/s eta 0:00:00 Installing collected packages: wheel, setuptools, pip, cython Attempting uninstall: wheel Found existing installation: wheel 0.38.4 Not uninstalling wheel at /usr/lib/python3/dist-packages, outside environment /home/w/dronekit_safe_env Can't uninstall 'wheel'. No files were found to uninstall. Attempting uninstall: setuptools Found existing installation: setuptools 66.1.1 Uninstalling setuptools-66.1.1: Successfully uninstalled setuptools-66.1.1 Attempting uninstall: pip Found existing installation: pip 23.0.1 Uninstalling pip-23.0.1: Successfully uninstalled pip-23.0.1 Successfully installed cython-3.1.2 pip-25.2 setuptools-80.9.0 wheel-0.45.1 (dronekit_safe_env) w@raspberrypi:~ $ git clone https://github.com/mavlink/pymavlink.git Cloning into 'pymavlink'... Username for 'https://github.com': cd pymavlink Password for 'https://cd%20pymavlink@github.com': remote: Invalid username or token. Password authentication is not supported for Git operations. fatal: Authentication failed for 'https://github.com/mavlink/pymavlink.git/' (dronekit_safe_env) w@raspberrypi:~ $ git clone https://github.com/mavlink/pymavlink.git cd pymavlink python setup.py bdist_wheel pip install dist/pymavlink-*.whl --no-cache-dir cd .. Cloning into 'pymavlink'... Username for 'https://github.com': Password for 'https://github.com': remote: Repository not found. fatal: Authentication failed for 'https://github.com/mavlink/pymavlink.git/' -bash: cd: pymavlink: No such file or directory python: can't open file '/home/w/setup.py': [Errno 2] No such file or directory WARNING: Requirement 'dist/pymavlink-*.whl' looks like a filename, but the file does not exist ERROR: Invalid wheel filename (wrong number of parts): 'pymavlink-*' (dronekit_safe_env) w@raspberrypi:/home $ git clone https://github.com/mavlink/pymavlink.git fatal: could not create work tree dir 'pymavlink': Permission denied (dronekit_safe_env) w@raspberrypi:/home $ cd ~ (dronekit_safe_env) w@raspberrypi:~ $ git clone https://github.com/mavlink/pymavlink.git Cloning into 'pymavlink'... Username for 'https://github.com': cd pymavlink Password for 'https://cd%20pymavlink@github.com': (dronekit_safe_env) w@raspberrypi:~ $ git clone https://github.com/mavlink/pymavlink.git Cloning into 'pymavlink'... Username for 'https://github.com': ^[[D^[[D^[[D^[[D^[[D^[[D^[[D^^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3~^[[3^[[C^[[C^[[C^[[C^C (dronekit_safe_env) w@raspberrypi:~ $ git clone https://github.com/mavlink/pymavlink.git Cloning into 'pymavlink'... Username for 'https://github.com': w Password for 'https://w@github.com': remote: Invalid username or token. Password authentication is not supported for Git operations. fatal: Authentication failed for 'https://github.com/mavlink/pymavlink.git/' (dronekit_safe_env) w@raspberrypi:~ $ rm -rf pymavlink (dronekit_safe_env) w@raspberrypi:~ $ sudo apt install -y \ build-essential \ python3-dev \ libxml2-dev \ libxslt1-dev \ libgeos-dev \ libproj-dev \ libssl-dev \ zlib1g-dev \ libffi-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done build-essential is already the newest version (12.9). python3-dev is already the newest version (3.11.2-1+b1). libxml2-dev is already the newest version (2.9.14+dfsg-1.3~deb12u2). libxslt1-dev is already the newest version (1.1.35-1+deb12u1). libgeos-dev is already the newest version (3.11.1-1). libproj-dev is already the newest version (9.1.1-1+b1). libssl-dev is already the newest version (3.0.17-1~deb12u1). zlib1g-dev is already the newest version (1:1.2.13.dfsg-1+rpt1). libffi-dev is already the newest version (3.4.4-1). The following packages were automatically installed and are no longer required: libbasicusageenvironment1 libgroupsock8 liblivemedia77 python3-v4l2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. (dronekit_safe_env) w@raspberrypi:~ $ sudo pip3 install --no-cache-dir --upgrade setuptools wheel error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. (dronekit_safe_env) w@raspberrypi:~ $ sudo apt install python3-dronekit Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package python3-dronekit (dronekit_safe_env) w@raspberrypi:~ $ sudo pip3 install --no-cache-dir Cython numpy error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. (dronekit_safe_env) w@raspberrypi:~ $ sudo pip3 install --no-cache-dir --upgrade setuptools wheel error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. (dronekit_safe_env) w@raspberrypi:~ $ source ~/dronekit_safe_env/bin/activate (dronekit_safe_env) w@raspberrypi:~ $ pip install --no-cache-dir --upgrade setuptools wheel Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: setuptools in ./dronekit_safe_env/lib/python3.11/site-packages (80.9.0) Requirement already satisfied: wheel in ./dronekit_safe_env/lib/python3.11/site-packages (0.45.1) WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/wheel/ WARNING: Error parsing dependencies of send2trash: Expected matching RIGHT_PARENTHESIS for LEFT_PARENTHESIS, after version specifier sys-platform (=="darwin") ; extra == 'objc' ~^ (dronekit_safe_env) w@raspberrypi:~ $ pip install --no-cache-dir --upgrade setuptools wheel Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: setuptools in ./dronekit_safe_env/lib/python3.11/site-packages (80.9.0) Requirement already satisfied: wheel in ./dronekit_safe_env/lib/python3.11/site-packages (0.45.1) WARNING: Error parsing dependencies of send2trash: Expected matching RIGHT_PARENTHESIS for LEFT_PARENTHESIS, after version specifier sys-platform (=="darwin") ; extra == 'objc' ~^ (dronekit_safe_env) w@raspberrypi:~ $ python3 -m venv ~/dronekit_safe_env (dronekit_safe_env) w@raspberrypi:~ $ source ~/dronekit_safe_env/bin/activate (dronekit_safe_env) w@raspberrypi:~ $ pip install --upgrade pip setuptools wheel Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: pip in ./dronekit_safe_env/lib/python3.11/site-packages (25.2) Requirement already satisfied: setuptools in ./dronekit_safe_env/lib/python3.11/site-packages (80.9.0) Requirement already satisfied: wheel in ./dronekit_safe_env/lib/python3.11/site-packages (0.45.1) (dronekit_safe_env) w@raspberrypi:~ $ pip list | grep -E "setuptools|wheel" setuptools 80.9.0 wheel 0.45.1 (dronekit_safe_env) w@raspberrypi:~ $ sudo pip3 install --no-cache-dir Cython numpy error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. For more information visit http://rptl.io/venv note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. (dronekit_safe_env) w@raspberrypi:~ $
08-03
PS C:\Users\Administrator\Desktop> # ===== 重构插件安装函数 ===== PS C:\Users\Administrator\Desktop> function Install-PthFixPlugin { >> param( >> [string]$PythonPath = "E:\Python310" >> ) >> >> $sitePackages = "$PythonPath\Lib\site-packages" >> $pluginRoot = "$sitePackages\pth_fix_plugin" >> >> # 创建插件目录结构 >> $packageDir = "$pluginRoot\pth_fix_plugin" >> New-Item -ItemType Directory -Path $packageDir -Force | Out-Null >> >> # 创建插件内容 >> $pluginFile = "$packageDir\__init__.py" >> @" >> # pth_fix_plugin/__init__.py >> import os >> import sys >> import logging >> from setuptools import setup >> from setuptools.command.install import install >> >> logger = logging.getLogger(__name__) >> >> class CustomInstallCommand(install): >> """自定义安装命令,阻止生成distutils-precedence.pth文件""" >> >> def run(self): >> # 调用原始安装方法 >> install.run(self) >> >> # 修复.pth文件 >> self.fix_pth_file() >> >> def fix_pth_file(self): >> """修复.pth文件问题""" >> pth_path = os.path.join(self.install_lib, 'distutils-precedence.pth') >> >> if os.path.exists(pth_path): >> logger.info(f"🔧 删除有问题的.pth文件: {pth_path}") >> try: >> os.remove(pth_path) >> logger.info("✅ 成功删除.pth文件") >> except Exception as e: >> logger.error(f"❌ 删除.pth文件失败: {str(e)}") >> else: >> logger.info("✅ 未发现.pth文件,无需修复") >> >> # 注册自定义命令 >> try: >> setup.commands['install'] = CustomInstallCommand >> logger.info("✅ 成功注册pth_fix插件") >> except Exception as e: >> logger.error(f"❌ 注册插件失败: {str(e)}") >> "@ | Set-Content -Path $pluginFile -Force >> >> # 创建入口点配置 >> $setupFile = "$pluginRoot\setup.py" >> @" >> from setuptools import setup >> >> setup( >> name='pth_fix_plugin', >> version='1.0.0', >> packages=['pth_fix_plugin'], >> entry_points={ >> 'distutils.commands': [ >> 'install = pth_fix_plugin:CustomInstallCommand', >> ], >> }, >> ) >> "@ | Set-Content -Path $setupFile -Force >> >> # 安装插件 >> Push-Location -Path $pluginRoot >> python -m pip install --no-deps -e . --no-warn-script-location >> Pop-Location >> >> Write-Host "✅ pth_fix插件安装完成" -ForegroundColor Green >> } PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # ===== 更新验证函数 ===== PS C:\Users\Administrator\Desktop> function Test-FullEnvironment { >> param( >> [string]$PythonPath = "E:\Python310" >> ) >> >> # 验证核心组件 >> python -c "import torch, torchvision, torchaudio, numpy as np, modelscope; print(f'PyTorch: {torch.__version__}\nTorchVision: {torchvision.__version__}\nTorchAudio: {torchaudio.__version__}\nNumPy: {np.__version__}\nAudio Backend: {torchaudio.get_audio_backend()}\nModelScope: {modelscope.__version__}')" >> >> # 验证警告 >> python -c "import warnings; warnings.filterwarnings('error'); import modelscope" 2>&1 | Out-Null >> if ($LASTEXITCODE -eq 0) { >> Write-Host "✅ 环境无警告" -ForegroundColor Green >> } else { >> Write-Host "❌ 环境存在警告" -ForegroundColor Red >> } >> >> # 验证.pth文件 >> $sitePackages = "$PythonPath\Lib\site-packages" >> if (Test-Path $sitePackages) { >> $pthFiles = Get-ChildItem $sitePackages -Filter "distutils-precedence.pth" -ErrorAction SilentlyContinue >> >> if ($pthFiles) { >> Write-Host "⚠️ 发现.pth文件: $($pthFiles.FullName)" -ForegroundColor Yellow >> } else { >> Write-Host "✅ 未发现distutils-precedence.pth文件" -ForegroundColor Green >> } >> >> # 验证插件状态 >> python -c "import sys; from pkg_resources import iter_entry_points; >> entry_points = list(iter_entry_points('distutils.commands', 'install')); >> if entry_points: >> print('✅ 安装命令挂钩:', entry_points[0].module_name) >> else: >> print('❌ 安装命令未挂钩')" >> } else { >> Write-Host "❌ 路径不存在: $sitePackages" -ForegroundColor Red >> } >> } PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # ===== 执行最终修复 ===== PS C:\Users\Administrator\Desktop> # 1. 确保插件目录完全删除 PS C:\Users\Administrator\Desktop> $pluginPath = "E:\Python310\Lib\site-packages\pth_fix_plugin" PS C:\Users\Administrator\Desktop> if (Test-Path $pluginPath) { >> Remove-Item -Path $pluginPath -Recurse -Force >> Write-Host "🔧 删除旧插件目录: $pluginPath" -ForegroundColor Cyan >> } 🔧 删除旧插件目录: E:\Python310\Lib\site-packages\pth_fix_plugin PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 2. 重新安装插件 PS C:\Users\Administrator\Desktop> Install-PthFixPlugin -PythonPath "E:\Python310" Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Obtaining file:///E:/Python310/Lib/site-packages/pth_fix_plugin Preparing metadata (setup.py) ... done Installing collected packages: pth_fix_plugin DEPRECATION: Legacy editable install of pth_fix_plugin==1.0.0 from file:///E:/Python310/Lib/site-packages/pth_fix_plugin (setup.py develop) is deprecated. pip 25.3 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457 Running setup.py develop for pth_fix_plugin error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─> [136 lines of output] running develop E:\Python310\lib\site-packages\setuptools\_distutils\cmd.py:90: DevelopDeprecationWarning: develop command is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` and ``develop``. Instead, use standards-based tools like pip or uv. By 2025-Oct-31, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://github.com/pypa/setuptools/issues/917 for details. ******************************************************************************** !! self.initialize_options() Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Obtaining file:///E:/Python310/Lib/site-packages/pth_fix_plugin Installing build dependencies: started Installing build dependencies: finished with status 'done' Checking if build backend supports build_editable: started Checking if build backend supports build_editable: finished with status 'done' Getting requirements to build editable: started Getting requirements to build editable: finished with status 'done' Preparing editable metadata (pyproject.toml): started Preparing editable metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: pth_fix_plugin Building editable for pth_fix_plugin (pyproject.toml): started Building editable for pth_fix_plugin (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error Building editable for pth_fix_plugin (pyproject.toml) did not run successfully. exit code: 1 [69 lines of output] running editable_wheel creating C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info writing C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\PKG-INFO writing dependency_links to C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\dependency_links.txt writing entry points to C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\entry_points.txt writing top-level names to C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\top_level.txt writing manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\SOURCES.txt' reading manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\SOURCES.txt' writing manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\SOURCES.txt' creating 'C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin-1.0.0.dist-info' creating C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin-1.0.0.dist-info\WHEEL Traceback (most recent call last): File "E:\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module> main() File "E:\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) File "E:\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 303, in build_editable return hook(wheel_directory, config_settings, metadata_directory) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\build_meta.py", line 468, in build_editable return self._build_with_temp_dir( File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\build_meta.py", line 404, in _build_with_temp_dir self.run_setup() File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\build_meta.py", line 512, in run_setup super().run_setup(setup_script=setup_script) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup exec(code, locals()) File "<string>", line 3, in <module> File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\__init__.py", line 115, in setup return distutils.core.setup(**attrs) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 186, in setup return run_commands(dist) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 202, in run_commands dist.run_commands() File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1002, in run_commands self.run_command(cmd) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\dist.py", line 1102, in run_command super().run_command(command) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1021, in run_command cmd_obj.run() File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 139, in run self._create_wheel_file(bdist_wheel) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 349, in _create_wheel_file files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 271, in _run_build_commands self._configure_build(dist_name, unpacked_wheel, build_lib, tmp_dir) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 209, in _configure_build install_cls, dist.reinitialize_command("install", reinit_subcommands=True) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 974, in reinitialize_command command = self.get_command_obj(command_name) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 884, in get_command_obj klass = self.get_command_class(command) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\dist.py", line 846, in get_command_class self.cmdclass[command] = cmdclass = ep.load() File "E:\Python310\lib\importlib\metadata\__init__.py", line 171, in load module = import_module(match.group('module')) File "E:\Python310\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 879, in exec_module File "<frozen importlib._bootstrap_external>", line 1017, in get_code File "<frozen importlib._bootstrap_external>", line 947, in source_to_code File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "E:\Python310\Lib\site-packages\pth_fix_plugin\pth_fix_plugin\__init__.py", line 11 """\ufffd\u0536\ufffd\ufffd尲\u05f0\ufffd\ufffd\ufffd\ue8ec\ufffd\ufffd\u05b9\ufffd\ufffd\ufffd\ufffddistutils-precedence.pth\ufffd\u013c\ufffd""" ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xd7 in position 0: invalid continuation byte [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building editable for pth_fix_plugin Failed to build pth_fix_plugin error: failed-wheel-build-for-install Failed to build installable wheels for some pyproject.toml based projects pth_fix_plugin Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 35, in <module> File "E:\Python310\Lib\site-packages\pth_fix_plugin\setup.py", line 3, in <module> setup( File "E:\Python310\lib\site-packages\setuptools\__init__.py", line 115, in setup return distutils.core.setup(**attrs) File "E:\Python310\lib\site-packages\setuptools\_distutils\core.py", line 186, in setup return run_commands(dist) File "E:\Python310\lib\site-packages\setuptools\_distutils\core.py", line 202, in run_commands dist.run_commands() File "E:\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 1002, in run_commands self.run_command(cmd) File "E:\Python310\lib\site-packages\setuptools\dist.py", line 1102, in run_command super().run_command(command) File "E:\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 1021, in run_command cmd_obj.run() File "E:\Python310\lib\site-packages\setuptools\command\develop.py", line 39, in run subprocess.check_call(cmd) File "E:\Python310\lib\subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['E:\\Python310\\python.exe', '-m', 'pip', 'install', '-e', '.', '--use-pep517', '--no-deps']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─> [136 lines of output] running develop E:\Python310\lib\site-packages\setuptools\_distutils\cmd.py:90: DevelopDeprecationWarning: develop command is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` and ``develop``. Instead, use standards-based tools like pip or uv. By 2025-Oct-31, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://github.com/pypa/setuptools/issues/917 for details. ******************************************************************************** !! self.initialize_options() Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Obtaining file:///E:/Python310/Lib/site-packages/pth_fix_plugin Installing build dependencies: started Installing build dependencies: finished with status 'done' Checking if build backend supports build_editable: started Checking if build backend supports build_editable: finished with status 'done' Getting requirements to build editable: started Getting requirements to build editable: finished with status 'done' Preparing editable metadata (pyproject.toml): started Preparing editable metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: pth_fix_plugin Building editable for pth_fix_plugin (pyproject.toml): started Building editable for pth_fix_plugin (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error Building editable for pth_fix_plugin (pyproject.toml) did not run successfully. exit code: 1 [69 lines of output] running editable_wheel creating C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info writing C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\PKG-INFO writing dependency_links to C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\dependency_links.txt writing entry points to C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\entry_points.txt writing top-level names to C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\top_level.txt writing manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\SOURCES.txt' reading manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\SOURCES.txt' writing manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin.egg-info\SOURCES.txt' creating 'C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin-1.0.0.dist-info' creating C:\Users\Administrator\AppData\Local\Temp\pip-wheel-t28f3jf3\.tmp-zcv0fbtc\pth_fix_plugin-1.0.0.dist-info\WHEEL Traceback (most recent call last): File "E:\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module> main() File "E:\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) File "E:\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 303, in build_editable return hook(wheel_directory, config_settings, metadata_directory) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\build_meta.py", line 468, in build_editable return self._build_with_temp_dir( File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\build_meta.py", line 404, in _build_with_temp_dir self.run_setup() File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\build_meta.py", line 512, in run_setup super().run_setup(setup_script=setup_script) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup exec(code, locals()) File "<string>", line 3, in <module> File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\__init__.py", line 115, in setup return distutils.core.setup(**attrs) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 186, in setup return run_commands(dist) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 202, in run_commands dist.run_commands() File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1002, in run_commands self.run_command(cmd) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\dist.py", line 1102, in run_command super().run_command(command) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1021, in run_command cmd_obj.run() File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 139, in run self._create_wheel_file(bdist_wheel) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 349, in _create_wheel_file files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 271, in _run_build_commands self._configure_build(dist_name, unpacked_wheel, build_lib, tmp_dir) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 209, in _configure_build install_cls, dist.reinitialize_command("install", reinit_subcommands=True) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 974, in reinitialize_command command = self.get_command_obj(command_name) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 884, in get_command_obj klass = self.get_command_class(command) File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-it_isus5\overlay\Lib\site-packages\setuptools\dist.py", line 846, in get_command_class self.cmdclass[command] = cmdclass = ep.load() File "E:\Python310\lib\importlib\metadata\__init__.py", line 171, in load module = import_module(match.group('module')) File "E:\Python310\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 879, in exec_module File "<frozen importlib._bootstrap_external>", line 1017, in get_code File "<frozen importlib._bootstrap_external>", line 947, in source_to_code File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "E:\Python310\Lib\site-packages\pth_fix_plugin\pth_fix_plugin\__init__.py", line 11 """\ufffd\u0536\ufffd\ufffd尲\u05f0\ufffd\ufffd\ufffd\ue8ec\ufffd\ufffd\u05b9\ufffd\ufffd\ufffd\ufffddistutils-precedence.pth\ufffd\u013c\ufffd""" ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xd7 in position 0: invalid continuation byte [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building editable for pth_fix_plugin Failed to build pth_fix_plugin error: failed-wheel-build-for-install Failed to build installable wheels for some pyproject.toml based projects pth_fix_plugin Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 35, in <module> File "E:\Python310\Lib\site-packages\pth_fix_plugin\setup.py", line 3, in <module> setup( File "E:\Python310\lib\site-packages\setuptools\__init__.py", line 115, in setup return distutils.core.setup(**attrs) File "E:\Python310\lib\site-packages\setuptools\_distutils\core.py", line 186, in setup return run_commands(dist) File "E:\Python310\lib\site-packages\setuptools\_distutils\core.py", line 202, in run_commands dist.run_commands() File "E:\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 1002, in run_commands self.run_command(cmd) File "E:\Python310\lib\site-packages\setuptools\dist.py", line 1102, in run_command super().run_command(command) File "E:\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 1021, in run_command cmd_obj.run() File "E:\Python310\lib\site-packages\setuptools\command\develop.py", line 39, in run subprocess.check_call(cmd) File "E:\Python310\lib\subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['E:\\Python310\\python.exe', '-m', 'pip', 'install', '-e', '.', '--use-pep517', '--no-deps']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ✅ pth_fix插件安装完成 PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 3. 验证环境 PS C:\Users\Administrator\Desktop> Test-FullEnvironment -PythonPath "E:\Python310" PyTorch: 2.0.0+cpu TorchVision: 0.15.1+cpu TorchAudio: 2.0.1+cpu NumPy: 1.26.4 Audio Backend: soundfile ModelScope: 1.29.0 ✅ 环境无警告 ⚠️ 发现.pth文件: E:\Python310\Lib\site-packages\distutils-precedence.pth <string>:1: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. ✅ 安装命令挂钩: setuptools.command.install PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 4. 测试修复持久性 PS C:\Users\Administrator\Desktop> python -m pip install --upgrade setuptools --force-reinstall Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting setuptools Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a3/dc/17031897dae0efacfea57dfd3a82fdd2a2aeb58e0ff71b77b87e44edc772/setuptools-80.9.0-py3-none-any.whl (1.2 MB) Installing collected packages: setuptools Attempting uninstall: setuptools Found existing installation: setuptools 80.9.0 Uninstalling setuptools-80.9.0: Successfully uninstalled setuptools-80.9.0 Successfully installed setuptools-80.9.0 PS C:\Users\Administrator\Desktop> Test-FullEnvironment -PythonPath "E:\Python310" PyTorch: 2.0.0+cpu TorchVision: 0.15.1+cpu TorchAudio: 2.0.1+cpu NumPy: 1.26.4 Audio Backend: soundfile ModelScope: 1.29.0 ✅ 环境无警告 ⚠️ 发现.pth文件: E:\Python310\Lib\site-packages\distutils-precedence.pth <string>:1: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. ✅ 安装命令挂钩: setuptools.command.install PS C:\Users\Administrator\Desktop> # 清理旧插件 PS C:\Users\Administrator\Desktop> 🔧 删除旧插件目录: E:\Python310\Lib\site-packages\pth_fix_plugin 🔧 : 无法将“🔧”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然 后再试一次。 所在位置 行:1 字符: 1 + 🔧 删除旧插件目录: E:\Python310\Lib\site-packages\pth_fix_plugin + ~~ + CategoryInfo : ObjectNotFound: (🔧:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 安装新插件 PS C:\Users\Administrator\Desktop> ✅ pth_fix插件安装完成 ✅ : 无法将“✅”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后 再试一次。 所在位置 行:1 字符: 1 + ✅ pth_fix插件安装完成 + ~ + CategoryInfo : ObjectNotFound: (✅:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 验证环境 PS C:\Users\Administrator\Desktop> PyTorch: 2.0.0+cpu PyTorch: : 无法将“PyTorch:”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保 路径正确,然后再试一次。 所在位置 行:1 字符: 1 + PyTorch: 2.0.0+cpu + ~~~~~~~~ + CategoryInfo : ObjectNotFound: (PyTorch::String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> TorchVision: 0.15.1+cpu TorchVision: : 无法将“TorchVision:”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径 ,请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1 + TorchVision: 0.15.1+cpu + ~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (TorchVision::String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> TorchAudio: 2.0.1+cpu TorchAudio: : 无法将“TorchAudio:”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径, 请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1 + TorchAudio: 2.0.1+cpu + ~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (TorchAudio::String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> NumPy: 1.26.4 NumPy: : 无法将“NumPy:”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径 正确,然后再试一次。 所在位置 行:1 字符: 1 + NumPy: 1.26.4 + ~~~~~~ + CategoryInfo : ObjectNotFound: (NumPy::String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> Audio Backend: soundfile Audio : 无法将“Audio”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正 确,然后再试一次。 所在位置 行:1 字符: 1 + Audio Backend: soundfile + ~~~~~ + CategoryInfo : ObjectNotFound: (Audio:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> ModelScope: 1.29.0 ModelScope: : 无法将“ModelScope:”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径, 请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1 + ModelScope: 1.29.0 + ~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (ModelScope::String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> ✅ 环境无警告 ✅ : 无法将“✅”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后 再试一次。 所在位置 行:1 字符: 1 + ✅ 环境无警告 + ~ + CategoryInfo : ObjectNotFound: (✅:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> ✅ 未发现distutils-precedence.pth文件 ✅ : 无法将“✅”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后 再试一次。 所在位置 行:1 字符: 1 + ✅ 未发现distutils-precedence.pth文件 + ~ + CategoryInfo : ObjectNotFound: (✅:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> ✅ 安装命令挂钩: pth_fix_plugin ✅ : 无法将“✅”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后 再试一次。 所在位置 行:1 字符: 1 + ✅ 安装命令挂钩: pth_fix_plugin + ~ + CategoryInfo : ObjectNotFound: (✅:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 测试持久性 PS C:\Users\Administrator\Desktop> Successfully installed setuptools-80.9.0 Successfully : 无法将“Successfully”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径 ,请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1 + Successfully installed setuptools-80.9.0 + ~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Successfully:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> PyTorch: 2.0.0+cpu PyTorch: : 无法将“PyTorch:”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保 路径正确,然后再试一次。 所在位置 行:1 字符: 1 + PyTorch: 2.0.0+cpu + ~~~~~~~~ + CategoryInfo : ObjectNotFound: (PyTorch::String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> TorchVision: 0.15.1+cpu TorchVision: : 无法将“TorchVision:”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径 ,请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1 + TorchVision: 0.15.1+cpu + ~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (TorchVision::String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> TorchAudio: 2.0.1+cpu TorchAudio: : 无法将“TorchAudio:”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径, 请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1 + TorchAudio: 2.0.1+cpu + ~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (TorchAudio::String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> NumPy: 1.26.4 NumPy: : 无法将“NumPy:”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径 正确,然后再试一次。 所在位置 行:1 字符: 1 + NumPy: 1.26.4 + ~~~~~~ + CategoryInfo : ObjectNotFound: (NumPy::String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> Audio Backend: soundfile Audio : 无法将“Audio”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正 确,然后再试一次。 所在位置 行:1 字符: 1 + Audio Backend: soundfile + ~~~~~ + CategoryInfo : ObjectNotFound: (Audio:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> ModelScope: 1.29.0 ModelScope: : 无法将“ModelScope:”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径, 请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1 + ModelScope: 1.29.0 + ~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (ModelScope::String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> ✅ 环境无警告 ✅ : 无法将“✅”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后 再试一次。 所在位置 行:1 字符: 1 + ✅ 环境无警告 + ~ + CategoryInfo : ObjectNotFound: (✅:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> ✅ 未发现distutils-precedence.pth文件 ✅ : 无法将“✅”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后 再试一次。 所在位置 行:1 字符: 1 + ✅ 未发现distutils-precedence.pth文件 + ~ + CategoryInfo : ObjectNotFound: (✅:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop> ✅ 安装命令挂钩: pth_fix_plugin ✅ : 无法将“✅”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后 再试一次。 所在位置 行:1 字符: 1 + ✅ 安装命令挂钩: pth_fix_plugin + ~ + CategoryInfo : ObjectNotFound: (✅:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator\Desktop>
08-23
PowerShell 7 环境已加载 (版本: 7.5.2) PowerShell 7 环境已加载 (版本: 7.5.2) PS C:\Users\Administrator\Desktop> cd E:\PyTorch_Build\pytorch PS E:\PyTorch_Build\pytorch> python -m venv rtx5070_env PS E:\PyTorch_Build\pytorch> .\rtx5070_env\Scripts\activate (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 修复之前的脚本错误 (rtx5070_env) PS E:\PyTorch_Build\pytorch> $fixedActivation = @" >> try { >> & "$activatePath" >> Write-Host "✅ 虚拟环境激活成功" -ForegroundColor Green >> python -VV >> } >> catch [System.Exception] { >> Write-Host "❌ 激活失败: $($_.Exception.Message)" -ForegroundColor Red >> } >> "@ InvalidOperation: Line | 3 | & "$activatePath" | ~~~~~~~~~~~~~ | The variable '$activatePath' cannot be retrieved because it has not been set. (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 切换到PyTorch源码目录 (rtx5070_env) PS E:\PyTorch_Build\pytorch> cd E:\PyTorch_Build\pytorch (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 更新pip到最新版 (rtx5070_env) PS E:\PyTorch_Build\pytorch> python -m pip install --upgrade pip Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: pip in e:\pytorch_build\pytorch\rtx5070_env\lib\site-packages (22.3.1) Collecting pip Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b7/3f/945ef7ab14dc4f9d7f40288d2df998d1837ee0888ec3659c813487572faa/pip-25.2-py3-none-any.whl (1.8 MB) Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 22.3.1 Uninstalling pip-22.3.1: Successfully uninstalled pip-22.3.1 Successfully installed pip-25.2 (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 安装编译依赖 (rtx5070_env) PS E:\PyTorch_Build\pytorch> pip install -r requirements-build.txt --verbose Using pip 25.2 from E:\PyTorch_Build\pytorch\rtx5070_env\lib\site-packages\pip (python 3.10) Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting setuptools<80.0,>=70.1.0 (from -r requirements-build.txt (line 2)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/0d/6d/b4752b044bf94cb802d88a888dc7d288baaf77d7910b7dedda74b5ceea0c/setuptools-79.0.1-py3-none-any.whl (1.3 MB) Collecting cmake>=3.27 (from -r requirements-build.txt (line 3)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7c/d0/73cae88d8c25973f2465d5a4457264f95617c16ad321824ed4c243734511/cmake-4.1.0-py3-none-win_amd64.whl (37.6 MB) Collecting ninja (from -r requirements-build.txt (line 4)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/29/45/c0adfbfb0b5895aa18cec400c535b4f7ff3e52536e0403602fc1a23f7de9/ninja-1.13.0-py3-none-win_amd64.whl (309 kB) Link requires a different Python (3.10.10 not in: '>=3.11'): https://pypi.tuna.tsinghua.edu.cn/packages/f3/db/8e12381333aea300890829a0a36bfa738cac95475d88982d538725143fd9/numpy-2.3.0.tar.gz (from https://pypi.tuna.tsinghua.edu.cn/simple/numpy/) (requires-python:>=3.11) Link requires a different Python (3.10.10 not in: '>=3.11'): https://pypi.tuna.tsinghua.edu.cn/packages/2e/19/d7c972dfe90a353dbd3efbbe1d14a5951de80c99c9dc1b93cd998d51dc0f/numpy-2.3.1.tar.gz (from https://pypi.tuna.tsinghua.edu.cn/simple/numpy/) (requires-python:>=3.11) Link requires a different Python (3.10.10 not in: '>=3.11'): https://pypi.tuna.tsinghua.edu.cn/packages/37/7d/3fec4199c5ffb892bed55cff901e4f39a58c81df9c44c280499e92cad264/numpy-2.3.2.tar.gz (from https://pypi.tuna.tsinghua.edu.cn/simple/numpy/) (requires-python:>=3.11) Collecting numpy (from -r requirements-build.txt (line 5)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl (12.9 MB) Collecting packaging (from -r requirements-build.txt (line 6)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl (66 kB) Collecting pyyaml (from -r requirements-build.txt (line 7)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b5/84/0fa4b06f6d6c958d207620fc60005e241ecedceee58931bb20138e1e5776/PyYAML-6.0.2-cp310-cp310-win_amd64.whl (161 kB) Collecting requests (from -r requirements-build.txt (line 8)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl (64 kB) Collecting six (from -r requirements-build.txt (line 9)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl (11 kB) Collecting typing-extensions>=4.10.0 (from -r requirements-build.txt (line 10)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl (44 kB) Collecting charset_normalizer<4,>=2 (from requests->-r requirements-build.txt (line 8)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e2/c6/f05db471f81af1fa01839d44ae2a8bfeec8d2a8b4590f16c4e7393afd323/charset_normalizer-3.4.3-cp310-cp310-win_amd64.whl (107 kB) Collecting idna<4,>=2.5 (from requests->-r requirements-build.txt (line 8)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl (70 kB) Collecting urllib3<3,>=1.21.1 (from requests->-r requirements-build.txt (line 8)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl (129 kB) Collecting certifi>=2017.4.17 (from requests->-r requirements-build.txt (line 8)) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e5/48/1549795ba7742c948d2ad169c1c8cdbae65bc450d6cd753d124b17c8cd32/certifi-2025.8.3-py3-none-any.whl (161 kB) Installing collected packages: urllib3, typing-extensions, six, setuptools, pyyaml, packaging, numpy, ninja, idna, cmake, charset_normalizer, certifi, requests Attempting uninstall: setuptools Found existing installation: setuptools 65.5.0 Uninstalling setuptools-65.5.0: Removing file or directory e:\pytorch_build\pytorch\rtx5070_env\lib\site-packages\_distutils_hack\ Removing file or directory e:\pytorch_build\pytorch\rtx5070_env\lib\site-packages\distutils-precedence.pth Removing file or directory e:\pytorch_build\pytorch\rtx5070_env\lib\site-packages\pkg_resources\ Removing file or directory e:\pytorch_build\pytorch\rtx5070_env\lib\site-packages\setuptools-65.5.0.dist-info\ Removing file or directory e:\pytorch_build\pytorch\rtx5070_env\lib\site-packages\setuptools\ Successfully uninstalled setuptools-65.5.0 Successfully installed certifi-2025.8.3 charset_normalizer-3.4.3 cmake-4.1.0 idna-3.10 ninja-1.13.0 numpy-2.2.6 packaging-25.0 pyyaml-6.0.2 requests-2.32.5 setuptools-79.0.1 six-1.17.0 typing-extensions-4.15.0 urllib3-2.5.0 (rtx5070_env) PS E:\PyTorch_Build\pytorch> pip install cmake ninja --upgrade Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: cmake in e:\pytorch_build\pytorch\rtx5070_env\lib\site-packages (4.1.0) Requirement already satisfied: ninja in e:\pytorch_build\pytorch\rtx5070_env\lib\site-packages (1.13.0) (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 清理旧编译产物 (rtx5070_env) PS E:\PyTorch_Build\pytorch> Remove-Item -Recurse -Force build, dist -ErrorAction SilentlyContinue (rtx5070_env) PS E:\PyTorch_Build\pytorch> Write-Host "`n==== 编译环境验证 ====" -ForegroundColor Cyan ==== 编译环境验证 ==== (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 1. 目录验证 (rtx5070_env) PS E:\PyTorch_Build\pytorch> Write-Host "当前目录: $pwd" 当前目录: E:\PyTorch_Build\pytorch (rtx5070_env) PS E:\PyTorch_Build\pytorch> if ($pwd -ne "E:\PyTorch_Build\pytorch") { >> Write-Host "⚠️ 错误: 需要切换到E:\PyTorch_Build\pytorch" -ForegroundColor Yellow >> cd E:\PyTorch_Build\pytorch >> } ⚠️ 错误: 需要切换到E:\PyTorch_Build\pytorch (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 2. CUDA工具链验证 (rtx5070_env) PS E:\PyTorch_Build\pytorch> $cudaStatus = @( >> "nvcc --version", >> "nvidia-smi", >> "where cudnn64_8.dll" >> ) (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> foreach ($cmd in $cudaStatus) { >> Write-Host "`n执行: $cmd" -ForegroundColor Magenta >> try { >> Invoke-Expression $cmd >> } >> catch { >> Write-Host "❌ 命令失败: $_" -ForegroundColor Red >> } >> } 执行: nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2025 NVIDIA Corporation Built on Wed_Jul_16_20:06:48_Pacific_Daylight_Time_2025 Cuda compilation tools, release 13.0, V13.0.48 Build cuda_13.0.r13.0/compiler.36260728_0 执行: nvidia-smi Wed Sep 3 22:04:47 2025 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 580.97 Driver Version: 580.97 CUDA Version: 13.0 | +-----------------------------------------+------------------------+----------------------+ | GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 5070 WDDM | 00000000:01:00.0 On | N/A | | 0% 38C P3 22W / 250W | 1601MiB / 12227MiB | 1% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | 0 N/A N/A 1540 C+G ...yb3d8bbwe\WindowsTerminal.exe N/A | | 0 N/A N/A 1916 C+G C:\Windows\System32\dwm.exe N/A | | 0 N/A N/A 4972 C+G ...em32\ApplicationFrameHost.exe N/A | | 0 N/A N/A 5036 C+G ...ef.win7x64\steamwebhelper.exe N/A | | 0 N/A N/A 5996 C+G ...8bbwe\PhoneExperienceHost.exe N/A | | 0 N/A N/A 6420 C+G ...ntrolPanel\SystemSettings.exe N/A | | 0 N/A N/A 8280 C+G C:\Windows\explorer.exe N/A | | 0 N/A N/A 8428 C+G ...indows\System32\ShellHost.exe N/A | | 0 N/A N/A 8616 C+G ..._cw5n1h2txyewy\SearchHost.exe N/A | | 0 N/A N/A 9212 C+G ...y\StartMenuExperienceHost.exe N/A | | 0 N/A N/A 10092 C+G ...0.3405.125\msedgewebview2.exe N/A | | 0 N/A N/A 12816 C+G ...5n1h2txyewy\TextInputHost.exe N/A | | 0 N/A N/A 13400 C+G ...crosoft\OneDrive\OneDrive.exe N/A | | 0 N/A N/A 14212 C+G ...t\Edge\Application\msedge.exe N/A | | 0 N/A N/A 14440 C+G ...acted\runtime\WeChatAppEx.exe N/A | | 0 N/A N/A 15156 C+G ...les\Tencent\Weixin\Weixin.exe N/A | | 0 N/A N/A 18312 C+G ...es\Microsoft VS Code\Code.exe N/A | +-----------------------------------------------------------------------------------------+ 执行: where cudnn64_8.dll (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 3. Python环境验证 (rtx5070_env) PS E:\PyTorch_Build\pytorch> Write-Host "`nPython环境状态:" -ForegroundColor Magenta Python环境状态: (rtx5070_env) PS E:\PyTorch_Build\pytorch> pip show torch | Select-String "Location" WARNING: Package(s) not found: torch (rtx5070_env) PS E:\PyTorch_Build\pytorch> python -c "import torch; print(f'PyTorch版本: {torch.__version__}')" Traceback (most recent call last): File "<string>", line 1, in <module> File "E:\PyTorch_Build\pytorch\torch\__init__.py", line 61, in <module> from torch.torch_version import __version__ as __version__ File "E:\PyTorch_Build\pytorch\torch\torch_version.py", line 5, in <module> from torch.version import __version__ as internal_version ModuleNotFoundError: No module named 'torch.version' (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 设置RTX 5070专属编译参数 (rtx5070_env) PS E:\PyTorch_Build\pytorch> $cmakeArgs = @( >> "-B build", >> "-G Ninja", >> "-DUSE_CUDA=ON", >> "-DUSE_CUDNN=ON", >> "-DCUDA_TOOLKIT_ROOT_DIR=`"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0`"", >> "-DCUDNN_ROOT_DIR=`"E:\Program Files\NVIDIA\CUNND\v9.12`"", >> "-DCUDA_ARCH_LIST=`"8.9`"", # RTX 5070架构 >> "-DTORCH_CUDA_ARCH_LIST=`"8.9`"", >> "-DCMAKE_BUILD_TYPE=Release", >> "-DUSE_NCCL=OFF", >> "-DUSE_MKLDNN=ON", >> "-DTORCH_CUDA_VERSION=11.8" # 兼容旧驱动 >> ) (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 启动配置过程 (rtx5070_env) PS E:\PyTorch_Build\pytorch> cmake ($cmakeArgs -join " ") CMake Error: Unable to (re)create the private pkgRedirects directory: E:/PyTorch_Build/pytorch/build -G Ninja -DUSE_CUDA=ON -DUSE_CUDNN=ON -DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0" -DCUDNN_ROOT_DIR="E:/Program Files/NVIDIA/CUNND/v9.12" -DCUDA_ARCH_LIST="8.9" -DTORCH_CUDA_ARCH_LIST="8.9" -DCMAKE_BUILD_TYPE=Release -DUSE_NCCL=OFF -DUSE_MKLDNN=ON -DTORCH_CUDA_VERSION=11.8/CMakeFiles/pkgRedirects This may be caused by not having read/write access to the build directory. Try specifying a location with read/write access like: cmake -B build If using a CMake presets file, ensure that preset parameter 'binaryDir' expands to a writable directory. (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 设置并行编译(根据CPU核心数调整) (rtx5070_env) PS E:\PyTorch_Build\pytorch> $env:MAX_JOBS = 8 (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> # 启动编译并记录日志 (rtx5070_env) PS E:\PyTorch_Build\pytorch> $logFile = "build_$(Get-Date -Format 'yyyyMMdd_HHmmss').log" (rtx5070_env) PS E:\PyTorch_Build\pytorch> Start-Transcript -Path $logFile Transcript started, output file is build_20250903_220514.log (rtx5070_env) PS E:\PyTorch_Build\pytorch> (rtx5070_env) PS E:\PyTorch_Build\pytorch> try { >> cmake --build build --config Release --parallel $env:MAX_JOBS >> pip install -v --no-build-isolation . >> } >> catch { >> Write-Host "🔥 编译失败!错误详情: $_" -ForegroundColor Red >> } Error: E:/PyTorch_Build/pytorch/build is not a directory Using pip 25.2 from E:\PyTorch_Build\pytorch\rtx5070_env\lib\site-packages\pip (python 3.10) Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Processing e:\pytorch_build\pytorch Running command Preparing metadata (pyproject.toml) Building wheel torch-2.9.0a0+git2d31c3d E:\PyTorch_Build\pytorch\rtx5070_env\lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated !! ******************************************************************************** Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0). By 2026-Feb-18, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! corresp(dist, value, root_dir) running dist_info creating C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-inyji1j9\torch.egg-info writing C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-inyji1j9\torch.egg-info\PKG-INFO writing dependency_links to C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-inyji1j9\torch.egg-info\dependency_links.txt writing entry points to C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-inyji1j9\torch.egg-info\entry_points.txt writing requirements to C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-inyji1j9\torch.egg-info\requires.txt writing top-level names to C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-inyji1j9\torch.egg-info\top_level.txt writing manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-inyji1j9\torch.egg-info\SOURCES.txt' reading manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-inyji1j9\torch.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'BUILD' warning: no files found matching '*.BUILD' warning: no files found matching 'BUCK' warning: no files found matching '[Mm]akefile.*' warning: no files found matching '*.[Dd]ockerfile' warning: no files found matching '[Dd]ockerfile.*' warning: no previously-included files matching '*.o' found anywhere in distribution warning: no previously-included files matching '*.obj' found anywhere in distribution warning: no previously-included files matching '*.so' found anywhere in distribution warning: no previously-included files matching '*.a' found anywhere in distribution warning: no previously-included files matching '*.dylib' found anywhere in distribution no previously-included directories found matching '*\.git' warning: no previously-included files matching '*~' found anywhere in distribution warning: no previously-included files matching '*.swp' found anywhere in distribution adding license file 'LICENSE' adding license file 'NOTICE' writing manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-inyji1j9\torch.egg-info\SOURCES.txt' creating 'C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-inyji1j9\torch-2.9.0a0+git2d31c3d.dist-info' Preparing metadata (pyproject.toml) ... done Collecting filelock (from torch==2.9.0a0+git2d31c3d) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/42/14/42b2651a2f46b022ccd948bca9f2d5af0fd8929c4eec235b8d6d844fbe67/filelock-3.19.1-py3-none-any.whl (15 kB) Requirement already satisfied: typing-extensions>=4.10.0 in e:\pytorch_build\pytorch\rtx5070_env\lib\site-packages (from torch==2.9.0a0+git2d31c3d) (4.15.0) Collecting sympy>=1.13.3 (from torch==2.9.0a0+git2d31c3d) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a2/09/77d55d46fd61b4a135c444fc97158ef34a095e5681d0a6c10b75bf356191/sympy-1.14.0-py3-none-any.whl (6.3 MB) Link requires a different Python (3.10.10 not in: '>=3.11'): https://pypi.tuna.tsinghua.edu.cn/packages/eb/8d/776adee7bbf76365fdd7f2552710282c79a4ead5d2a46408c9043a2b70ba/networkx-3.5-py3-none-any.whl (from https://pypi.tuna.tsinghua.edu.cn/simple/networkx/) (requires-python:>=3.11) Link requires a different Python (3.10.10 not in: '>=3.11'): https://pypi.tuna.tsinghua.edu.cn/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz (from https://pypi.tuna.tsinghua.edu.cn/simple/networkx/) (requires-python:>=3.11) Link requires a different Python (3.10.10 not in: '>=3.11'): https://pypi.tuna.tsinghua.edu.cn/packages/3f/a1/46c1b6e202e3109d2a035b21a7e5534c5bb233ee30752d7f16a0bd4c3989/networkx-3.5rc0-py3-none-any.whl (from https://pypi.tuna.tsinghua.edu.cn/simple/networkx/) (requires-python:>=3.11) Link requires a different Python (3.10.10 not in: '>=3.11'): https://pypi.tuna.tsinghua.edu.cn/packages/90/7e/0319606a20ced20730806b9f7fe91d8a92f7da63d76a5c388f87d3f7d294/networkx-3.5rc0.tar.gz (from https://pypi.tuna.tsinghua.edu.cn/simple/networkx/) (requires-python:>=3.11) Collecting networkx>=2.5.1 (from torch==2.9.0a0+git2d31c3d) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b9/54/dd730b32ea14ea797530a4479b2ed46a6fb250f682a9cfb997e968bf0261/networkx-3.4.2-py3-none-any.whl (1.7 MB) Collecting jinja2 (from torch==2.9.0a0+git2d31c3d) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl (134 kB) Collecting fsspec>=0.8.5 (from torch==2.9.0a0+git2d31c3d) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/47/71/70db47e4f6ce3e5c37a607355f80da8860a33226be640226ac52cb05ef2e/fsspec-2025.9.0-py3-none-any.whl (199 kB) Collecting mpmath<1.4,>=1.1.0 (from sympy>=1.13.3->torch==2.9.0a0+git2d31c3d) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl (536 kB) Collecting MarkupSafe>=2.0 (from jinja2->torch==2.9.0a0+git2d31c3d) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/44/06/e7175d06dd6e9172d4a69a72592cb3f7a996a9c396eee29082826449bbc3/MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl (15 kB) Building wheels for collected packages: torch Running command Building wheel for torch (pyproject.toml) Building wheel torch-2.9.0a0+git2d31c3d -- Building version 2.9.0a0+git2d31c3d E:\PyTorch_Build\pytorch\rtx5070_env\lib\site-packages\setuptools\_distutils\_msvccompiler.py:12: UserWarning: _get_vc_env is private; find an alternative (pypa/distutils#340) warnings.warn( Cloning into 'nccl'... Note: switching to '3ea7eedf3b9b94f1d9f99f4e55536dfcbd23c1ca'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name> Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false cmake -GNinja -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=E:\PyTorch_Build\pytorch\torch -DCMAKE_PREFIX_PATH=E:\PyTorch_Build\pytorch\rtx5070_env\Lib\site-packages -DCUDNN_INCLUDE_DIR=E:\Program Files\NVIDIA\CUNND\v9.12\include\12.9 -DCUDNN_LIBRARY=E:\Program Files\NVIDIA\CUNND\v9.12\lib\12.9\x64 -DCUDNN_ROOT=E:\Program Files\NVIDIA\CUNND\v9.12 -DPython_EXECUTABLE=E:\PyTorch_Build\pytorch\rtx5070_env\Scripts\python.exe -DPython_NumPy_INCLUDE_DIR=E:\PyTorch_Build\pytorch\rtx5070_env\lib\site-packages\numpy\_core\include -DTORCH_BUILD_VERSION=2.9.0a0+git2d31c3d -DTORCH_CUDA_ARCH_LIST=8.9 -DUSE_NUMPY=True -DUSE_OPENBLAS=1 E:\PyTorch_Build\pytorch CMake Deprecation Warning at CMakeLists.txt:9 (cmake_policy): The OLD behavior for policy CMP0126 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. -- The CXX compiler identification is MSVC 19.44.35215.0 -- The C compiler identification is MSVC 19.44.35215.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Not forcing any particular BLAS to be found CMake Warning at CMakeLists.txt:421 (message): TensorPipe cannot be used on Windows. Set it to OFF CMake Warning at CMakeLists.txt:423 (message): KleidiAI cannot be used on Windows. Set it to OFF CMake Warning at CMakeLists.txt:435 (message): Libuv is not installed in current conda env. Set USE_DISTRIBUTED to OFF. Please run command 'conda install -c conda-forge libuv=1.39' to install libuv. -- Performing Test C_HAS_AVX_1 -- Performing Test C_HAS_AVX_1 - Success -- Performing Test C_HAS_AVX2_1 -- Performing Test C_HAS_AVX2_1 - Success -- Performing Test C_HAS_AVX512_1 -- Performing Test C_HAS_AVX512_1 - Success -- Performing Test CXX_HAS_AVX_1 -- Performing Test CXX_HAS_AVX_1 - Success -- Performing Test CXX_HAS_AVX2_1 -- Performing Test CXX_HAS_AVX2_1 - Success -- Performing Test CXX_HAS_AVX512_1 -- Performing Test CXX_HAS_AVX512_1 - Success -- Current compiler supports avx2 extension. Will build perfkernels. -- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY -- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY - Failed -- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY - Failed -- Could not find hardware support for NEON on this machine. -- No OMAP3 processor on this machine. -- No OMAP4 processor on this machine. -- Compiler does not support SVE extension. Will not build perfkernels. CMake Warning at CMakeLists.txt:841 (message): x64 operating system is required for FBGEMM. Not compiling with FBGEMM. Turn this warning off by USE_FBGEMM=OFF. -- Performing Test HAS/UTF_8 -- Performing Test HAS/UTF_8 - Success -- Found CUDA: E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0 (found version "13.0") -- The CUDA compiler identification is NVIDIA 13.0.48 with host compiler MSVC 19.44.35215.0 -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Check for working CUDA compiler: E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/bin/nvcc.exe - skipped -- Detecting CUDA compile features -- Detecting CUDA compile features - done -- Found CUDAToolkit: E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/include (found version "13.0.48") -- PyTorch: CUDA detected: 13.0 -- PyTorch: CUDA nvcc is: E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0/bin/nvcc.exe -- PyTorch: CUDA toolkit directory: E:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v13.0 -- PyTorch: Header version is: 13.0 -- Found Python: E:\PyTorch_Build\pytorch\rtx5070_env\Scripts\python.exe (found version "3.10.10") found components: Interpreter CMake Warning at cmake/public/cuda.cmake:140 (message): Failed to compute shorthash for libnvrtc.so Call Stack (most recent call first): cmake/Dependencies.cmake:44 (include) CMakeLists.txt:869 (include) -- Found CUDNN: E:/Program Files/NVIDIA/CUNND/v9.12/lib/13.0/x64/cudnn.lib -- Could NOT find CUSPARSELT (missing: CUSPARSELT_LIBRARY_PATH CUSPARSELT_INCLUDE_PATH) CMake Warning at cmake/public/cuda.cmake:226 (message): Cannot find cuSPARSELt library. Turning the option off Call Stack (most recent call first): cmake/Dependencies.cmake:44 (include) CMakeLists.txt:869 (include) -- Could NOT find CUDSS (missing: CUDSS_LIBRARY_PATH CUDSS_INCLUDE_PATH) CMake Warning at cmake/public/cuda.cmake:242 (message): Cannot find CUDSS library. Turning the option off Call Stack (most recent call first): cmake/Dependencies.cmake:44 (include) CMakeLists.txt:869 (include) -- USE_CUFILE is set to 0. Compiling without cuFile support CMake Warning at cmake/public/cuda.cmake:317 (message): pytorch is not compatible with `CMAKE_CUDA_ARCHITECTURES` and will ignore its value. Please configure `TORCH_CUDA_ARCH_LIST` instead. Call Stack (most recent call first): cmake/Dependencies.cmake:44 (include) CMakeLists.txt:869 (include) -- Added CUDA NVCC flags for: -gencode;arch=compute_89,code=sm_89 CMake Warning at cmake/Dependencies.cmake:95 (message): Not compiling with XPU. Could NOT find SYCL. Suppress this warning with -DUSE_XPU=OFF. Call Stack (most recent call first): CMakeLists.txt:869 (include) -- Building using own protobuf under third_party per request. -- Use custom protobuf build. CMake Warning at cmake/ProtoBuf.cmake:37 (message): Ancient protobuf forces CMake compatibility Call Stack (most recent call first): cmake/ProtoBuf.cmake:87 (custom_protobuf_find) cmake/Dependencies.cmake:107 (include) CMakeLists.txt:869 (include) CMake Deprecation Warning at third_party/protobuf/cmake/CMakeLists.txt:2 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. -- -- 3.13.0.0 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - not found -- Found Threads: TRUE -- Caffe2 protobuf include directory: $<BUILD_INTERFACE:E:/PyTorch_Build/pytorch/third_party/protobuf/src>$<INSTALL_INTERFACE:include> -- Trying to find preferred BLAS backend of choice: MKL -- MKL_THREADING = OMP -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void* -- Check size of void* - done -- MKL_THREADING = OMP CMake Warning at cmake/Dependencies.cmake:213 (message): MKL could not be found. Defaulting to Eigen Call Stack (most recent call first): CMakeLists.txt:869 (include) CMake Warning at cmake/Dependencies.cmake:279 (message): Preferred BLAS (MKL) cannot be found, now searching for a general BLAS library Call Stack (most recent call first): CMakeLists.txt:869 (include) -- MKL_THREADING = OMP -- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - libiomp5md] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_intel_thread - mkl_core - libiomp5md] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_intel_thread - mkl_core] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_sequential - mkl_core] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_sequential - mkl_core] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_core - libiomp5md - pthread] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_core - libiomp5md - pthread] -- Library mkl_intel: not found -- Checking for [mkl_intel_lp64 - mkl_core - pthread] -- Library mkl_intel_lp64: not found -- Checking for [mkl_intel - mkl_core - pthread] -- Library mkl_intel: not found -- Checking for [mkl - guide - pthread - m] -- Library mkl: not found -- MKL library not found -- Checking for [blis] -- Library blis: BLAS_blis_LIBRARY-NOTFOUND -- Checking for [Accelerate] -- Library Accelerate: BLAS_Accelerate_LIBRARY-NOTFOUND -- Checking for [vecLib] -- Library vecLib: BLAS_vecLib_LIBRARY-NOTFOUND -- Checking for [flexiblas] -- Library flexiblas: BLAS_flexiblas_LIBRARY-NOTFOUND -- Checking for [openblas] -- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND -- Checking for [openblas - pthread - m] -- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND -- Checking for [openblas - pthread - m - gomp] -- Library openblas: BLAS_openblas_LIBRARY-NOTFOUND -- Checking for [libopenblas] -- Library libopenblas: BLAS_libopenblas_LIBRARY-NOTFOUND -- Checking for [goto2 - gfortran] -- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND -- Checking for [goto2 - gfortran - pthread] -- Library goto2: BLAS_goto2_LIBRARY-NOTFOUND -- Checking for [acml - gfortran] -- Library acml: BLAS_acml_LIBRARY-NOTFOUND -- Checking for [blis] -- Library blis: BLAS_blis_LIBRARY-NOTFOUND -- Could NOT find Atlas (missing: Atlas_CBLAS_INCLUDE_DIR Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY) -- Checking for [ptf77blas - atlas - gfortran] -- Library ptf77blas: BLAS_ptf77blas_LIBRARY-NOTFOUND -- Checking for [] -- Looking for sgemm_ -- Looking for sgemm_ - not found -- Cannot find a library with BLAS API. Not using BLAS. -- Using pocketfft in directory: E:/PyTorch_Build/pytorch/third_party/pocketfft/ CMake Deprecation Warning at third_party/pthreadpool/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. CMake Deprecation Warning at third_party/FXdiv/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. CMake Deprecation Warning at third_party/cpuinfo/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. -- The ASM compiler identification is MSVC CMake Warning (dev) at rtx5070_env/Lib/site-packages/cmake/data/share/cmake-4.1/Modules/CMakeDetermineASMCompiler.cmake:234 (message): Policy CMP194 is not set: MSVC is not an assembler for language ASM. Run "cmake --help-policy CMP194" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): third_party/XNNPACK/CMakeLists.txt:18 (PROJECT) This warning is for project developers. Use -Wno-dev to suppress it. -- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe -- Building for XNNPACK_TARGET_PROCESSOR: x86_64 -- Generating microkernels.cmake
最新发布
09-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值