【协程原理】 - cPython的VM真变态

本文深入探讨了如何在cPython上实现类似JVM的协程,包括利用sys._getframe获取调用栈、Python字节码增强技巧,以及面对复杂帧状态管理的挑战。通过分析Python字节码生成过程和内置函数操作,揭示了为何直接复制JVM的实现较为困难,并提供了在Python中实现类似协程机制的方法。

kilim在JVM上实现了协程,其实现看起来挺容易的:http://www.malhar.net/sriram/kilim/thread_of_ones_own.pdf
在cPython上是否能够复制其技法呢?粗看上去,是很容易的,甚至比JVM更好实现:

  • 利用sys._getframe(0)可以获得call stack上的任意frame
  • frame的f_locals可以获得这个frame的所有局部变量的值(https://docs.python.org/3/library/inspect.html)
  • 虽然python不支持goto或者longjmp,然后cPython的bytecode是支持JUMP_ABSOLUTE的(https://docs.python.org/3/library/dis.html)

一个更加牛B的事情是,有人已经用@goto装饰器的方式在Python上实现了GOTO了
这个是Python 2版本的:http://code.activestate.com/recipes/576944-the-goto-decorator/
这个是Python 3版本的:https://github.com/cdjc/goto

这两个实现很好的展示了如何在Python中做类似JVM上ASM库做的事情,字节码增强。

===============
但是,cPython的VM对于frame状态的建模使得在cPython上实现kilim,比JVM要难得多。在cPython某个指令执行的那一刻,有五个部分的状态

  • builtins
  • globals
  • locals
  • value_stack
  • block_stack

前三个都是python里做动态执行的常客,没啥困难的。而且frame通过inpsect可以很轻易的获得locals的值。而后两者是非常困难的,我们可以来看一段我随便写的代码

for i in range(1):
    print(i)

生成的bytecode是

      0 SETUP_LOOP         30 (to 33) 
      3 LOAD_GLOBAL         0 (0) 
      6 LOAD_CONST          1 (1) 
      9 CALL_FUNCTION       1 (1 positional, 0 keyword pair) 
     12 GET_ITER        
>>   13 FOR_ITER           16 (to 32) 
     16 STORE_FAST          0 (0) 
     19 LOAD_GLOBAL         1 (1) 
     22 LOAD_FAST           0 (0) 
     25 CALL_FUNCTION       1 (1 positional, 0 keyword pair) 
     28 POP_TOP         
     29 JUMP_ABSOLUTE      13 
>>   32 POP_BLOCK       
>>   33 LOAD_CONST          0 (0) 
     36 RETURN_VALUE 

我们可以看到一个简单的循环,产生了一对SETUP_LOOP和POP_BLOCK,这个是操作block_stack的。以及GET_ITER和FOR_ITER这是操作value_stack的。如果我们想要直接跳入到print(i)这一行,那么就要恢复当时的block_stack,以及当时的value_stack。而且要特别注意GET_ITER的含义是把栈顶的值标识为ITER,使得FOR_ITER可以使用,所以还不是简单地把value_stack恢复就可以了

GET_ITER
Implements TOS = iter(TOS).

这篇博客把python的frame内部状态讲得非常清楚:http://tech.blog.aknin.name/tag/block-stack/
以上可以解释为什么没有人在python里搞字节码的trick了,因为这个VM太变态。

数据集介绍:垃圾分类检测数据集 一、基础信息 数据集名称:垃圾分类检测数据集 图片数量: 训练集:2,817张图片 验证集:621张图片 测试集:317张图片 总计:3,755张图片 分类类别: - 金属:常见的金属垃圾材料。 - 纸板:纸板类垃圾,如包装盒等。 - 塑料:塑料类垃圾,如瓶子、容器等。 标注格式: YOLO格式,包含边界框和类别标签,适用于目标检测任务。 数据格式:图片来源于实际场景,格式为常见图像格式(如JPEG/PNG)。 二、适用场景 智能垃圾回收系统开发: 数据集支持目标检测任务,帮助构建能够自动识别和分类垃圾材料的AI模型,用于自动化废物分类和回收系统。 环境监测与废物管理: 集成至监控系统或机器人中,实时检测垃圾并分类,提升废物处理效率和环保水平。 学术研究与教育: 支持计算机视觉与环保领域的交叉研究,用于教学、实验和论文发表。 三、数据集优势 类别覆盖全面: 包含三种常见垃圾材料类别,覆盖日常生活中主要的可回收物类型,具有实际应用价值。 标注精准可靠: 采用YOLO标注格式,边界框定位精确,类别标签准确,便于模型直接训练和使用。 数据量适中合理: 训练集、验证集和测试集分布均衡,提供足够样本用于模型学习和评估。 任务适配性强: 标注兼容主流深度学习框架(如YOLO等),可直接用于目标检测任务,支持垃圾检测相关应用。
copying pyarrow\tests\parquet\test_dataset.py -> build\lib.win-amd64-cpython-313\pyarrow\tests\parquet copying pyarrow\tests\parquet\test_data_types.py -> build\lib.win-amd64-cpython-313\pyarrow\tests\parquet copying pyarrow\tests\parquet\test_datetime.py -> build\lib.win-amd64-cpython-313\pyarrow\tests\parquet copying pyarrow\tests\parquet\test_encryption.py -> build\lib.win-amd64-cpython-313\pyarrow\tests\parquet copying pyarrow\tests\parquet\test_metadata.py -> build\lib.win-amd64-cpython-313\pyarrow\tests\parquet copying pyarrow\tests\parquet\test_pandas.py -> build\lib.win-amd64-cpython-313\pyarrow\tests\parquet copying pyarrow\tests\parquet\test_parquet_file.py -> build\lib.win-amd64-cpython-313\pyarrow\tests\parquet copying pyarrow\tests\parquet\test_parquet_writer.py -> build\lib.win-amd64-cpython-313\pyarrow\tests\parquet copying pyarrow\tests\parquet\__init__.py -> build\lib.win-amd64-cpython-313\pyarrow\tests\parquet running egg_info writing pyarrow.egg-info\PKG-INFO writing dependency_links to pyarrow.egg-info\dependency_links.txt writing requirements to pyarrow.egg-info\requires.txt writing top-level names to pyarrow.egg-info\top_level.txt listing git files failed - pretending there aren't any reading manifest file 'pyarrow.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '..\LICENSE.txt' warning: no files found matching '..\NOTICE.txt' warning: no previously-included files matching '*.so' found anywhere in distribution warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files matching '*~' found anywhere in distribution warning: no previously-included files matching '#*' found anywhere in distribution warning: no previously-included files matching '.git*' found anywhere in distribution warning: no previously-included files matching '.DS_Store' found anywhere in distribution no previously-included directories found matching '.asv' writing manifest file 'pyarrow.egg-info\SOURCES.txt' copying pyarrow\__init__.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_acero.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_acero.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_compute.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_compute.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_csv.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_csv.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_cuda.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_cuda.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_dataset.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_dataset.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_dataset_orc.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_dataset_parquet.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_dataset_parquet.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_dataset_parquet_encryption.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_feather.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_flight.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_fs.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_fs.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_gcsfs.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_hdfs.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_hdfsio.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_json.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_json.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_orc.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_orc.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_parquet.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_parquet.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_parquet_encryption.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_parquet_encryption.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_pyarrow_cpp_tests.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_pyarrow_cpp_tests.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_s3fs.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\_substrait.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\array.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\benchmark.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\builder.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\compat.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\config.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\error.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\gandiva.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\io.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\ipc.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\lib.pxd -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\lib.pyx -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\memory.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\pandas-shim.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\public-api.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\scalar.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\table.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\tensor.pxi -> build\lib.win-amd64-cpython-313\pyarrow copying pyarrow\types.pxi -> build\lib.win-amd64-cpython-313\pyarrow creating build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\common.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libarrow.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libarrow_acero.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libarrow_cuda.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libarrow_dataset.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libarrow_dataset_parquet.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libarrow_feather.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libarrow_flight.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libarrow_fs.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libarrow_python.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libarrow_substrait.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libgandiva.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\libparquet_encryption.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\includes\__init__.pxd -> build\lib.win-amd64-cpython-313\pyarrow\includes copying pyarrow\tests\bound_function_visit_strings.pyx -> build\lib.win-amd64-cpython-313\pyarrow\tests copying pyarrow\tests\extensions.pyx -> build\lib.win-amd64-cpython-313\pyarrow\tests copying pyarrow\tests\pyarrow_cython_example.pyx -> build\lib.win-amd64-cpython-313\pyarrow\tests creating build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\CMakeLists.txt -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\api.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\arrow_to_pandas.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\arrow_to_pandas.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\arrow_to_python_internal.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\async.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\benchmark.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\benchmark.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\common.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\common.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\csv.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\csv.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\datetime.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\datetime.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\decimal.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\decimal.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\deserialize.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\deserialize.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\extension_type.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\extension_type.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\filesystem.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\filesystem.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\flight.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\flight.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\gdb.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\gdb.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\helpers.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\helpers.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\inference.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\inference.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\init.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\init.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\io.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\io.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\ipc.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\ipc.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\iterators.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\numpy_convert.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\numpy_convert.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\numpy_internal.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\numpy_interop.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\numpy_to_arrow.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\numpy_to_arrow.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\parquet_encryption.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\parquet_encryption.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\pch.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\platform.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\pyarrow.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\pyarrow.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\pyarrow_api.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\pyarrow_lib.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\python_test.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\python_test.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\python_to_arrow.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\python_to_arrow.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\serialize.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\serialize.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\type_traits.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\udf.cc -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\udf.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python copying pyarrow\src\arrow\python\visibility.h -> build\lib.win-amd64-cpython-313\pyarrow\src\arrow\python creating build\lib.win-amd64-cpython-313\pyarrow\tests\data\feather copying pyarrow\tests\data\feather\v0.17.0.version.2-compression.lz4.feather -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\feather creating build\lib.win-amd64-cpython-313\pyarrow\tests\data\orc copying pyarrow\tests\data\orc\README.md -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\orc copying pyarrow\tests\data\orc\TestOrcFile.emptyFile.jsn.gz -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\orc copying pyarrow\tests\data\orc\TestOrcFile.emptyFile.orc -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\orc copying pyarrow\tests\data\orc\TestOrcFile.test1.jsn.gz -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\orc copying pyarrow\tests\data\orc\TestOrcFile.test1.orc -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\orc copying pyarrow\tests\data\orc\TestOrcFile.testDate1900.jsn.gz -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\orc copying pyarrow\tests\data\orc\TestOrcFile.testDate1900.orc -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\orc copying pyarrow\tests\data\orc\decimal.jsn.gz -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\orc copying pyarrow\tests\data\orc\decimal.orc -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\orc creating build\lib.win-amd64-cpython-313\pyarrow\tests\data\parquet copying pyarrow\tests\data\parquet\v0.7.1.all-named-index.parquet -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\parquet copying pyarrow\tests\data\parquet\v0.7.1.column-metadata-handling.parquet -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\parquet copying pyarrow\tests\data\parquet\v0.7.1.parquet -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\parquet copying pyarrow\tests\data\parquet\v0.7.1.some-named-index.parquet -> build\lib.win-amd64-cpython-313\pyarrow\tests\data\parquet running build_ext creating C:\Users\Administrator\AppData\Local\Temp\pip-install-wrjj3ms4\pyarrow_41692841b7744b60bbbc4bd9879199e9\build\temp.win-amd64-cpython-313 -- Running cmake for PyArrow cmake -DCMAKE_INSTALL_PREFIX=C:\Users\Administrator\AppData\Local\Temp\pip-install-wrjj3ms4\pyarrow_41692841b7744b60bbbc4bd9879199e9\build\lib.win-amd64-cpython-313\pyarrow -DPYTHON_EXECUTABLE=D:\zy\project-python-zy\ai\test-image\ti-test01\venv\Scripts\python.exe -DPython3_EXECUTABLE=D:\zy\project-python-zy\ai\test-image\ti-test01\venv\Scripts\python.exe -DPYARROW_CXXFLAGS= -G "Visual Studio 15 2017 Win64" -DPYARROW_BUILD_CUDA=off -DPYARROW_BUILD_SUBSTRAIT=off -DPYARROW_BUILD_FLIGHT=off -DPYARROW_BUILD_GANDIVA=off -DPYARROW_BUILD_ACERO=off -DPYARROW_BUILD_DATASET=off -DPYARROW_BUILD_ORC=off -DPYARROW_BUILD_PARQUET=off -DPYARROW_BUILD_PARQUET_ENCRYPTION=off -DPYARROW_BUILD_GCS=off -DPYARROW_BUILD_S3=off -DPYARROW_BUILD_HDFS=off -DPYARROW_BUNDLE_ARROW_CPP=off -DPYARROW_BUNDLE_CYTHON_CPP=off -DPYARROW_GENERATE_COVERAGE=off -DCMAKE_BUILD_TYPE=release C:\Users\Administrator\AppData\Local\Temp\pip-install-wrjj3ms4\pyarrow_41692841b7744b60bbbc4bd9879199e9 error: command 'cmake' failed: None [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyarrow Failed to build pyarrow error: failed-wheel-build-for-install × Failed to build installable wheels for some pyproject.toml based projects ╰─> pyarrow (venv) PS D:\zy\project-python-zy\ai\test-image\ti-test01>
08-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值