1

セロリのドキュメントには、Jython で実行できるはずであると記載されています。残念ながら、私はそれを機能させることができません。実行しようとすると、次のエラーが表示されます。


Traceback (most recent call last):
  File "/home/linoor/jython2.7.0/bin/celery", line 11, in 
    sys.exit(main())
  File "/home/linoor/jython2.7.0/Lib/site-packages/celery/__main__.py", line 29, in main
    from celery.bin.celery import main
  File "/home/linoor/jython2.7.0/Lib/site-packages/celery/bin/__init__.py", line 3, in 
    from .base import Option
  File "/home/linoor/jython2.7.0/Lib/site-packages/celery/bin/base.py", line 86, in 
    from celery import VERSION_BANNER, Celery, maybe_patch_concurrency
  File "/home/linoor/jython2.7.0/Lib/site-packages/celery/five.py", line 307, in __getattr__
    module = __import__(self._object_origins[name], None, None, [name])
  File "/home/linoor/jython2.7.0/Lib/site-packages/celery/app/__init__.py", line 14, in 
    from celery import _state
  File "/home/linoor/jython2.7.0/Lib/site-packages/celery/_state.py", line 20, in 
    from celery.utils.threads import LocalStack
  File "/home/linoor/jython2.7.0/Lib/site-packages/celery/utils/__init__.py", line 27, in 
    from celery.exceptions import CPendingDeprecationWarning, CDeprecationWarning
  File "/home/linoor/jython2.7.0/Lib/site-packages/celery/exceptions.py", line 15, in 
    from billiard.exceptions import (  # noqa
  File "/home/linoor/jython2.7.0/Lib/site-packages/billiard/__init__.py", line 60, in 
    from .process import Process, current_process, active_children
  File "/home/linoor/jython2.7.0/Lib/site-packages/billiard/process.py", line 25, in 
    from multiprocessing import process as _mproc
ImportError: No module named multiprocessing

そこで、マルチプロセッシングをインストールしようとしましたが、次のことが起こりました。


Downloading/unpacking multiprocessing
  Downloading multiprocessing-2.6.2.1.tar.gz (108kB): 108kB downloaded
  Running setup.py (path:/tmp/pip_build_linoor/multiprocessing/setup.py) egg_info for package multiprocessing

Installing collected packages: multiprocessing
  Running setup.py install for multiprocessing
    building 'multiprocessing._multiprocessing' extension
    error: Compiling extensions is not supported on Jython
    Complete output from command /home/linoor/jython2.7.0/bin/jython -c "import setuptools, tokenize;__file__='/tmp/pip_build_linoor/multiprocessing/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EnQW3c-record/install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build/lib.java1.7.0_79-2.7

creating build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/queues.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/tests.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/sharedctypes.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/synchronize.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/heap.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/pool.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/connection.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/__init__.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/util.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/process.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/reduction.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/managers.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/forking.py -> build/lib.java1.7.0_79-2.7/multiprocessing

copying Lib/multiprocessing/patch.py -> build/lib.java1.7.0_79-2.7/multiprocessing

creating build/lib.java1.7.0_79-2.7/multiprocessing/dummy

copying Lib/multiprocessing/dummy/connection.py -> build/lib.java1.7.0_79-2.7/multiprocessing/dummy

copying Lib/multiprocessing/dummy/__init__.py -> build/lib.java1.7.0_79-2.7/multiprocessing/dummy

creating build/lib.java1.7.0_79-2.7/multiprocessing/examples

copying Doc/includes/mp_benchmarks.py -> build/lib.java1.7.0_79-2.7/multiprocessing/examples

copying Doc/includes/mp_synchronize.py -> build/lib.java1.7.0_79-2.7/multiprocessing/examples

copying Doc/includes/mp_workers.py -> build/lib.java1.7.0_79-2.7/multiprocessing/examples

copying Doc/includes/__init__.py -> build/lib.java1.7.0_79-2.7/multiprocessing/examples

copying Doc/includes/mp_newtype.py -> build/lib.java1.7.0_79-2.7/multiprocessing/examples

copying Doc/includes/mp_distributing.py -> build/lib.java1.7.0_79-2.7/multiprocessing/examples

copying Doc/includes/mp_webserver.py -> build/lib.java1.7.0_79-2.7/multiprocessing/examples

copying Doc/includes/mp_pool.py -> build/lib.java1.7.0_79-2.7/multiprocessing/examples

running build_ext

building 'multiprocessing._multiprocessing' extension

error: Compiling extensions is not supported on Jython

multiprocessing私が読んだところによると、C拡張が必要な​​ため、Jythonでパッケージを使用することはできません( SOの質問へのリンク)。

結局のところ、セロリを Jython で実行することは可能なのでしょうか?

ありがとう!

4

1 に答える 1