Python:安装多处理

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2424078/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-04 00:37:31  来源:igfitidea点击:

Python: installing multiprocessing

pythonmodule

提问by AP257

I need to import the multiprocessing module in Python 2.5.

我需要在 Python 2.5 中导入多处理模块。

I've followed the instructions here exactly: http://code.google.com/p/python-multiprocessing/wiki/Install

我完全按照这里的说明操作:http: //code.google.com/p/python-multiprocessing/wiki/Install

make and make test run without errors. I've also edited $PYTHONPATH to include the directory where the package is installed.

make 和 make 测试运行没有错误。我还编辑了 $PYTHONPATH 以包含安装包的目录。

But 'import multiprocessing' still says: "ImportError: no module named multiprocessing".

但是“导入多处理”仍然说:“导入错误:没有名为多处理的模块”。

What am I doing wrong? Is there some step missing from these instructions? I haven't installed a Python module before.

我究竟做错了什么?这些说明中是否缺少某些步骤?我之前没有安装过 Python 模块。

回答by YHVH

Navigate to the directory containing the package then type:

导航到包含包的目录,然后键入:

python setup.py install

This info was contained in the INSTALL.txt file.

此信息包含在 INSTALL.txt 文件中。

http://code.google.com/p/python-multiprocessing/source/browse/trunk/INSTALL.txt

http://code.google.com/p/python-multiprocessing/source/browse/trunk/INSTALL.txt

回答by Nick Hermans

perhaps you can try:

也许你可以尝试:

import sys
sys.path.append('/path/to/processingdotpylibs/')
import processing