file-type

解决opencc-python安装错误的快速指南

ZIP文件

4星 · 超过85%的资源 | 下载需积分: 46 | 5KB | 更新于2025-03-19 | 72 浏览量 | 901 下载量 举报 收藏
download 立即下载
根据给定的文件信息,我们可以得知相关知识点涉及Python开发环境的配置和模块安装流程。以下详细说明这些知识点: ### 1. Python模块安装机制 Python的包和模块可以通过多种方式进行安装,常见的有: - 使用`pip`,即Python包安装工具,通过命令行工具安装包到Python的默认库目录。 - 手动下载或复制模块到Python的site-packages目录中。 - 通过源代码安装包。 在本例中,提到的是`opencc-python`的安装问题,需要手动解压缩`distribute_setup.zip`文件,并手动处理安装问题。 ### 2. distribute和distribute_setup `distribute`原本是一个流行的第三方包分发工具,用于创建和安装Python包。后来,其功能被集成到`setuptools`中,因此在新版本的Python开发中已经不再需要`distribute`,而是使用`setuptools`和`pip`。 ### 3. distribute_setup.py的作用 `distribute_setup.py`通常是一个安装脚本,用于安装`distribute`包。在本例中,我们了解到在安装`opencc-python`出错的情况下,可能需要手动介入,使用`distribute_setup.py`脚本来尝试修复安装环境。 ### 4. 解压缩文件的步骤 在Python中解压缩文件,通常可以使用内置的`zipfile`模块。例如: ```python import zipfile with zipfile.ZipFile('distribute_setup.zip', 'r') as zip_ref: zip_ref.extractall('.') ``` 这将解压缩文件到当前工作目录。 ### 5. 文件路径操作 在描述中提到了特定的文件路径`C:\Python\Lib`。这表示用户在Windows操作系统上的Python安装路径下的Lib目录。在Linux或macOS系统中,路径可能类似于`/usr/lib/python<version>/lib`。 ### 6. Python环境变量设置 `C:\Python\Lib`是Python的标准库目录之一,是存放Python解释器自带的模块的地方。当Python解释器启动时,会通过环境变量如`PYTHONPATH`来确定在哪里查找模块。 ### 7. 安装opencc-python包 `opencc-python`是一个用于在简体中文和繁体中文之间进行转换的Python库。如果默认的安装方式出现错误,可能是由于网络问题、依赖关系缺失或者Python环境配置问题导致的。 ### 8. 安装步骤及故障排除 当遇到安装错误时,可以按照以下步骤尝试解决问题: 1. 确认网络连接正常,因为安装过程中可能需要从互联网下载依赖包。 2. 确认Python环境是否正常,可以尝试运行Python脚本确保解释器无误。 3. 检查是否有权限问题,例如在Windows上可能出现权限不足导致写入目录失败。 4. 使用其他安装方式,比如下载源码手动安装或使用conda、easy_install等其他包管理工具。 ### 9. 错误处理和调试 在Python中进行错误处理和调试,可以使用try-except语句块来捕获和处理异常。例如: ```python try: # 尝试执行安装操作 pass except Exception as e: # 如果有错误发生,则捕获异常并打印详细信息 print(f"安装出错: {e}") ``` ### 10. 模块依赖与兼容性问题 在安装第三方模块时,经常需要解决依赖问题。确保Python的版本和第三方库的版本兼容也是非常关键的。 ### 结语 通过上述知识点的详细解释,我们了解到解决Python模块安装问题时可能需要对安装机制、文件操作和环境配置有较为深入的理解。同时,应具备一定的故障排查能力,以确保Python环境的正常运作。

相关推荐

filetype

pip3 install . Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Processing /home/ubuntu/large_models/speech_pkg Preparing metadata (setup.py) ... done Building wheels for collected packages: speech DEPRECATION: Building 'speech' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'speech'. Discussion can be found at https://github.com/pypa/pip/issues/6334 Building wheel for speech (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [322 lines of output] running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/speech copying speech/awake.py -> build/lib/speech copying speech/__init__.py -> build/lib/speech running egg_info writing speech.egg-info/PKG-INFO writing dependency_links to speech.egg-info/dependency_links.txt writing top-level names to speech.egg-info/top_level.txt reading manifest file 'speech.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'speech.egg-info/SOURCES.txt' /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'speech.jetson_nano' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'speech.jetson_nano' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'speech.jetson_nano' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'speech.jetson_nano' to be distributed and are already explicitly excluding 'speech.jetson_nano' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'speech.jetson_orin' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'speech.jetson_orin' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'speech.jetson_orin' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'speech.jetson_orin' to be distributed and are already explicitly excluding 'speech.jetson_orin' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'speech.resources' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'speech.resources' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'speech.resources' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'speech.resources' to be distributed and are already explicitly excluding 'speech.resources' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'speech.rpi5' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'speech.rpi5' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'speech.rpi5' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'speech.rpi5' to be distributed and are already explicitly excluding 'speech.rpi5' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'speech.rpi5_docker' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'speech.rpi5_docker' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'speech.rpi5_docker' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'speech.rpi5_docker' to be distributed and are already explicitly excluding 'speech.rpi5_docker' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) copying speech/speech.so -> build/lib/speech creating build/lib/speech/jetson_nano copying speech/jetson_nano/py3.6 -> build/lib/speech/jetson_nano copying speech/jetson_nano/speech.so -> build/lib/speech/jetson_nano creating build/lib/speech/jetson_orin copying speech/jetson_orin/py3.10 -> build/lib/speech/jetson_orin copying speech/jetson_orin/speech.so -> build/lib/speech/jetson_orin creating build/lib/speech/resources copying speech/resources/_detect_jetson_nano.so -> build/lib/speech/resources copying speech/resources/_detect_jetson_orin.so -> build/lib/speech/resources copying speech/resources/_detect_rpi5.so -> build/lib/speech/resources copying speech/resources/_detect_rpi5_docker_ubuntu20_04.so -> build/lib/speech/resources copying speech/resources/common.res -> build/lib/speech/resources copying speech/resources/detect_jetson_nano.so -> build/lib/speech/resources copying speech/resources/detect_jetson_orin.so -> build/lib/speech/resources copying speech/resources/detect_rpi5.so -> build/lib/speech/resources copying speech/resources/detect_rpi5_docker_ubuntu20_04.so -> build/lib/speech/resources copying speech/resources/vad.jit -> build/lib/speech/resources creating build/lib/speech/rpi5 copying speech/rpi5/py3.11 -> build/lib/speech/rpi5 copying speech/rpi5/speech.so -> build/lib/speech/rpi5 creating build/lib/speech/rpi5_docker copying speech/rpi5_docker/py3.8 -> build/lib/speech/rpi5_docker copying speech/rpi5_docker/speech.so -> build/lib/speech/rpi5_docker copying speech/awake.py -> build/lib/speech copying speech/__init__.py -> build/lib/speech /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() installing to build/bdist.linux-aarch64/wheel running install running install_lib creating build/bdist.linux-aarch64 creating build/bdist.linux-aarch64/wheel creating build/bdist.linux-aarch64/wheel/speech copying build/lib/speech/awake.py -> build/bdist.linux-aarch64/wheel/speech creating build/bdist.linux-aarch64/wheel/speech/jetson_orin copying build/lib/speech/jetson_orin/speech.so -> build/bdist.linux-aarch64/wheel/speech/jetson_orin copying build/lib/speech/jetson_orin/py3.10 -> build/bdist.linux-aarch64/wheel/speech/jetson_orin creating build/bdist.linux-aarch64/wheel/speech/rpi5_docker copying build/lib/speech/rpi5_docker/speech.so -> build/bdist.linux-aarch64/wheel/speech/rpi5_docker copying build/lib/speech/rpi5_docker/py3.8 -> build/bdist.linux-aarch64/wheel/speech/rpi5_docker creating build/bdist.linux-aarch64/wheel/speech/rpi5 copying build/lib/speech/rpi5/speech.so -> build/bdist.linux-aarch64/wheel/speech/rpi5 copying build/lib/speech/rpi5/py3.11 -> build/bdist.linux-aarch64/wheel/speech/rpi5 copying build/lib/speech/speech.so -> build/bdist.linux-aarch64/wheel/speech creating build/bdist.linux-aarch64/wheel/speech/jetson_nano copying build/lib/speech/jetson_nano/py3.6 -> build/bdist.linux-aarch64/wheel/speech/jetson_nano copying build/lib/speech/jetson_nano/speech.so -> build/bdist.linux-aarch64/wheel/speech/jetson_nano copying build/lib/speech/__init__.py -> build/bdist.linux-aarch64/wheel/speech creating build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/_detect_rpi5.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/common.res -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/_detect_jetson_nano.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/detect_jetson_orin.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/detect_jetson_nano.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/detect_rpi5_docker_ubuntu20_04.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/detect_rpi5.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/vad.jit -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/_detect_jetson_orin.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/_detect_rpi5_docker_ubuntu20_04.so -> build/bdist.linux-aarch64/wheel/speech/resources running install_egg_info Copying speech.egg-info to build/bdist.linux-aarch64/wheel/speech-1.0-py3.10.egg-info running install_scripts creating build/bdist.linux-aarch64/wheel/speech-1.0.dist-info/WHEEL creating '/tmp/pip-wheel-4gy84oln/speech-1.0-py3-none-any.whl' and adding 'build/bdist.linux-aarch64/wheel' to it Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 35, in <module> File "/home/ubuntu/large_models/speech_pkg/setup.py", line 3, in <module> setup( File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup return distutils.core.setup(**attrs) File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup return run_commands(dist) File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands dist.run_commands() File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/dist.py", line 968, in run_command super().run_command(command) File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 361, in run wf.write_files(archive_root) File "/usr/lib/python3/dist-packages/wheel/wheelfile.py", line 136, in write_files self.write(path, arcname) File "/usr/lib/python3/dist-packages/wheel/wheelfile.py", line 147, in write zinfo = ZipInfo(arcname or filename, date_time=get_zipinfo_datetime(st.st_mtime)) File "/usr/lib/python3.10/zipfile.py", line 366, in __init__ raise ValueError('ZIP does not support timestamps before 1980') ValueError: ZIP does not support timestamps before 1980 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for speech Running setup.py clean for speech Failed to build speech ERROR: Failed to build installable wheels for some pyproject.toml based projects (speech) > cat ~/large_models/speech_pkg/pyproject.toml cat: /home/ubuntu/large_models/speech_pkg/pyproject.toml: No such file or directory > pip3 install . Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Processing /home/ubuntu/large_models/speech_pkg Preparing metadata (setup.py) ... done Building wheels for collected packages: speech DEPRECATION: Building 'speech' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'speech'. Discussion can be found at https://github.com/pypa/pip/issues/6334 Building wheel for speech (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [322 lines of output] running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/speech copying speech/awake.py -> build/lib/speech copying speech/__init__.py -> build/lib/speech running egg_info writing speech.egg-info/PKG-INFO writing dependency_links to speech.egg-info/dependency_links.txt writing top-level names to speech.egg-info/top_level.txt reading manifest file 'speech.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'speech.egg-info/SOURCES.txt' /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'speech.jetson_nano' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'speech.jetson_nano' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'speech.jetson_nano' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'speech.jetson_nano' to be distributed and are already explicitly excluding 'speech.jetson_nano' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'speech.jetson_orin' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'speech.jetson_orin' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'speech.jetson_orin' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'speech.jetson_orin' to be distributed and are already explicitly excluding 'speech.jetson_orin' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'speech.resources' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'speech.resources' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'speech.resources' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'speech.resources' to be distributed and are already explicitly excluding 'speech.resources' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'speech.rpi5' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'speech.rpi5' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'speech.rpi5' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'speech.rpi5' to be distributed and are already explicitly excluding 'speech.rpi5' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'speech.rpi5_docker' is absent from the `packages` configuration. !! ******************************************************************************** ############################ # Package would be ignored # ############################ Python recognizes 'speech.rpi5_docker' as an importable package[^1], but it is absent from setuptools' `packages` configuration. This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'speech.rpi5_docker' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'speech.rpi5_docker' to be distributed and are already explicitly excluding 'speech.rpi5_docker' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) copying speech/speech.so -> build/lib/speech creating build/lib/speech/jetson_nano copying speech/jetson_nano/py3.6 -> build/lib/speech/jetson_nano copying speech/jetson_nano/speech.so -> build/lib/speech/jetson_nano creating build/lib/speech/jetson_orin copying speech/jetson_orin/py3.10 -> build/lib/speech/jetson_orin copying speech/jetson_orin/speech.so -> build/lib/speech/jetson_orin creating build/lib/speech/resources copying speech/resources/_detect_jetson_nano.so -> build/lib/speech/resources copying speech/resources/_detect_jetson_orin.so -> build/lib/speech/resources copying speech/resources/_detect_rpi5.so -> build/lib/speech/resources copying speech/resources/_detect_rpi5_docker_ubuntu20_04.so -> build/lib/speech/resources copying speech/resources/common.res -> build/lib/speech/resources copying speech/resources/detect_jetson_nano.so -> build/lib/speech/resources copying speech/resources/detect_jetson_orin.so -> build/lib/speech/resources copying speech/resources/detect_rpi5.so -> build/lib/speech/resources copying speech/resources/detect_rpi5_docker_ubuntu20_04.so -> build/lib/speech/resources copying speech/resources/vad.jit -> build/lib/speech/resources creating build/lib/speech/rpi5 copying speech/rpi5/py3.11 -> build/lib/speech/rpi5 copying speech/rpi5/speech.so -> build/lib/speech/rpi5 creating build/lib/speech/rpi5_docker copying speech/rpi5_docker/py3.8 -> build/lib/speech/rpi5_docker copying speech/rpi5_docker/speech.so -> build/lib/speech/rpi5_docker copying speech/awake.py -> build/lib/speech copying speech/__init__.py -> build/lib/speech /home/ubuntu/.local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() installing to build/bdist.linux-aarch64/wheel running install running install_lib creating build/bdist.linux-aarch64 creating build/bdist.linux-aarch64/wheel creating build/bdist.linux-aarch64/wheel/speech copying build/lib/speech/awake.py -> build/bdist.linux-aarch64/wheel/speech creating build/bdist.linux-aarch64/wheel/speech/jetson_orin copying build/lib/speech/jetson_orin/speech.so -> build/bdist.linux-aarch64/wheel/speech/jetson_orin copying build/lib/speech/jetson_orin/py3.10 -> build/bdist.linux-aarch64/wheel/speech/jetson_orin creating build/bdist.linux-aarch64/wheel/speech/rpi5_docker copying build/lib/speech/rpi5_docker/speech.so -> build/bdist.linux-aarch64/wheel/speech/rpi5_docker copying build/lib/speech/rpi5_docker/py3.8 -> build/bdist.linux-aarch64/wheel/speech/rpi5_docker creating build/bdist.linux-aarch64/wheel/speech/rpi5 copying build/lib/speech/rpi5/speech.so -> build/bdist.linux-aarch64/wheel/speech/rpi5 copying build/lib/speech/rpi5/py3.11 -> build/bdist.linux-aarch64/wheel/speech/rpi5 copying build/lib/speech/speech.so -> build/bdist.linux-aarch64/wheel/speech creating build/bdist.linux-aarch64/wheel/speech/jetson_nano copying build/lib/speech/jetson_nano/py3.6 -> build/bdist.linux-aarch64/wheel/speech/jetson_nano copying build/lib/speech/jetson_nano/speech.so -> build/bdist.linux-aarch64/wheel/speech/jetson_nano copying build/lib/speech/__init__.py -> build/bdist.linux-aarch64/wheel/speech creating build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/_detect_rpi5.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/common.res -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/_detect_jetson_nano.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/detect_jetson_orin.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/detect_jetson_nano.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/detect_rpi5_docker_ubuntu20_04.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/detect_rpi5.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/vad.jit -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/_detect_jetson_orin.so -> build/bdist.linux-aarch64/wheel/speech/resources copying build/lib/speech/resources/_detect_rpi5_docker_ubuntu20_04.so -> build/bdist.linux-aarch64/wheel/speech/resources running install_egg_info Copying speech.egg-info to build/bdist.linux-aarch64/wheel/speech-1.0-py3.10.egg-info running install_scripts creating build/bdist.linux-aarch64/wheel/speech-1.0.dist-info/WHEEL creating '/tmp/pip-wheel-dpii6adm/speech-1.0-py3-none-any.whl' and adding 'build/bdist.linux-aarch64/wheel' to it Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 35, in <module> File "/home/ubuntu/large_models/speech_pkg/setup.py", line 3, in <module> setup( File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup return distutils.core.setup(**attrs) File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup return run_commands(dist) File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands dist.run_commands() File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/dist.py", line 968, in run_command super().run_command(command) File "/home/ubuntu/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 361, in run wf.write_files(archive_root) File "/usr/lib/python3/dist-packages/wheel/wheelfile.py", line 136, in write_files self.write(path, arcname) File "/usr/lib/python3/dist-packages/wheel/wheelfile.py", line 147, in write zinfo = ZipInfo(arcname or filename, date_time=get_zipinfo_datetime(st.st_mtime)) File "/usr/lib/python3.10/zipfile.py", line 366, in __init__ raise ValueError('ZIP does not support timestamps before 1980') ValueError: ZIP does not support timestamps before 1980 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for speech Running setup.py clean for speech Failed to build speech ERROR: Failed to build installable wheels for some pyproject.toml based projects (speech)

filetype

This leads to an ambiguous overall configuration. If you want to distribute this package, please make sure that 'word2vec.includes.win32' is explicitly added to the `packages` configuration field. Alternatively, you can also rely on setuptools' discovery methods (for example by using `find_namespace_packages(...)`/`find_namespace:` instead of `find_packages(...)`/`find:`). You can read more about "package discovery" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html If you don't want 'word2vec.includes.win32' to be distributed and are already explicitly excluding 'word2vec.includes.win32' via `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, you can try to use `exclude_package_data`, or `include-package-data=False` in combination with a more fine grained `package-data` configuration. You can read more about "package data files" on setuptools documentation page: - https://setuptools.pypa.io/en/latest/userguide/datafiles.html [^1]: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages. ******************************************************************************** !! check.warn(importable) Running custom Install command Compiling: gcc C:\Users\赵晓欣\AppData\Local\Temp\pip-install-ftjmqoun\word2vec_abfbdc25dc324d5d827fec11bce31cf1\word2vec\includes\win32/word2vec.c -o Scripts\word2vec.exe -O2 -Wall -funroll-loops error: [WinError 2] 系统找不到指定的文件。 [end of output] note: This error originates fr

tab_space
  • 粉丝: 90
上传资源 快速赚钱