Skip to content

建议更新 requirements.txt 以移除过时的 multiprocessing 依赖 #31

@524994432

Description

@524994432

问题描述

在 Python 3 环境下安装 CLAM 时,requirements.txt 中的 multiprocessing 依赖会导致安装失败。该依赖项在 PyPI 上指向仅兼容 Python 2 的旧包(最新版本为 2.6.2.1),其 setup.py 包含 Python 2 语法(如 print '...'),与 Python 3 不兼容。


复现步骤

  1. 在 Python 3.10 环境中运行:
    pip install -r requirements.txt

触发以下错误:
log
error: subprocess-exited-with-error
...
File "setup.py", line 94
print 'Macros:'
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'
Collecting multiprocessing (from -r requirements.txt (line 2))
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b8/8a/38187040f36cec8f98968502992dca9b00cc5e88553e01884ba29cbe6aac/multiprocessing-2.6.2.1.tar.gz (108 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-jo6e5xr6/multiprocessing_79170498316f487d8f78bcc5494d7822/setup.py", line 94
print 'Macros:'
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions