2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

cwltoil のインストールができない問題

Last updated at Posted at 2018-07-17

bh badge right

この記事は 国内版 BioHackathon 2018 in 徳島 の成果物です。

cwltoil を使いたい。コンテナもあるけど、コンテナでネットワークの問題っぽいものにぶつかったのでネイティブでインストールして検証したい。公式のインストールガイドには "Installing Toil with Extra Features" としてCWLをtoilで実行するための準備として以下の手順に従えと書いてある。

$ pip install virtualenv
$ virtualenv ~/venv
$ source ~/venv/bin/activate

で、

$ pip install toil[aws,mesos,azure,google,encryption,cwl]

もしくは

$ pip install toil[all]

こう。

で、この [] はなんなんだろうなと思いつつcwlだけ欲しいので以下のように実行してみる。

$ pip install toil[cwl]
zsh: no matches found: toil[cwl]

怒られる。これはもしかしてこうかな?

$ pip install toil cwl
...

cwlパッケージがインストールされた模様なのでコマンドを叩いてみる。

$ cwltoil
Traceback (most recent call last):
  File "/home/inutano/venv/bin/cwltoil", line 7, in <module>
    from toil.cwl.cwltoil import main
  File "/home/inutano/venv/lib/python2.7/site-packages/toil/cwl/cwltoil.py", line 28, in <module>
    import cwltool.errors
ImportError: No module named cwltool.errors

また怒られる。えー。それっぽい感じでいろいろ叩いてみる。

$ pip install cwltoil
Collecting cwltoil
  Could not find a version that satisfies the requirement cwltoil (from versions: )
No matching distribution found for cwltoil

えー。

Collecting toilcwl
  Could not find a version that satisfies the requirement toilcwl (from versions: )
No matching distribution found for toilcwl

あかんかー。やっぱり [] つけないとだめ?

試しにやってみる

$ pip install 'toil[cwl]'
...
...
Successfully built rdflib pyyaml avro rdflib-jsonld CacheControl scandir
Installing collected packages: ruamel.ordereddict, ruamel.yaml, scandir, pathlib2, shellescape, isodate, pyparsing, rdflib, avro, mistune, lockfile, rdflib-jsonld, CacheControl,
typing, schema-salad, cwltool, pyyaml, docutils, galaxy-lib
Successfully installed CacheControl-0.11.7 avro-1.8.1 cwltool-1.0.20180518123035 docutils-0.14 galaxy-lib-17.9.3 isodate-0.6.0 lockfile-0.12.2 mistune-0.7.4 pathlib2-2.3.2 pypars
ing-2.2.0 pyyaml-3.13 rdflib-4.2.2 rdflib-jsonld-0.4.0 ruamel.ordereddict-0.4.13 ruamel.yaml-0.14.12 scandir-1.7 schema-salad-2.7.20180611133406 shellescape-3.4.1 typing-3.6.4

うおー!

$ cwltoil
DEBUG:rdflib:RDFLib Version: 4.2.2                                                                                                                                        [43/523]
usage: cwltoil [-h] [--logOff] [--logCritical] [--logError] [--logWarning]
               [--logInfo] [--logDebug] [--logLevel LOGLEVEL]
               [--logFile LOGFILE] [--rotatingLogging] [--workDir WORKDIR]
               [--stats] [--clean {always,onError,never,onSuccess}]
               [--cleanWorkDir {always,never,onSuccess,onError}]
               [--clusterStats [CLUSTERSTATS]] [--restart]
               [--batchSystem BATCHSYSTEM] [--disableHotDeployment]
               [--disableAutoDeployment] [--maxLocalJobs MAXLOCALJOBS]
               [--parasolCommand PARASOLCOMMAND]
               [--parasolMaxBatches PARASOLMAXBATCHES] [--scale SCALE]
               [--noLinkImports] [--mesosMaster MESOSMASTERADDRESS]
               [--provisioner {aws,azure,gce}] [--nodeTypes NODETYPES]
               [--nodeOptions NODEOPTIONS] [--minNodes MINNODES]
               [--maxNodes MAXNODES] [--targetTime TARGETTIME]
               [--betaInertia BETAINERTIA] [--scaleInterval SCALEINTERVAL]
               [--preemptableCompensation PREEMPTABLECOMPENSATION]
               [--nodeStorage NODESTORAGE] [--metrics] [--defaultMemory INT]
               [--defaultCores FLOAT] [--defaultDisk INT]
               [--defaultPreemptable] [--maxCores INT] [--maxMemory INT]
               [--maxDisk INT] [--retryCount RETRYCOUNT]
               [--maxJobDuration MAXJOBDURATION]
               [--rescueJobsFrequency RESCUEJOBSFREQUENCY] [--disableCaching]
               [--disableChaining] [--maxLogFileSize MAXLOGFILESIZE]
               [--writeLogs [WRITELOGS]] [--writeLogsGzip [WRITELOGSGZIP]]
               [--realTimeLogging] [--sseKey SSEKEY] [--cseKey CSEKEY]
               [--setEnv NAME=VALUE or NAME]
               [--servicePollingInterval SERVICEPOLLINGINTERVAL]
               [--forceDockerAppliance] [--debugWorker]
               [--badWorker BADWORKER]
               [--badWorkerFailInterval BADWORKERFAILINTERVAL]
               [--jobStore JOBSTORE] [--not-strict] [--quiet]
               [--basedir BASEDIR] [--outdir OUTDIR] [--version]
               [--user-space-docker-cmd USER_SPACE_DOCKER_CMD | --singularity | --no-container]
               [--preserve-environment VAR1 VAR2 [VAR1 VAR2 ...]]
               [--beta-dependency-resolvers-configuration BETA_DEPENDENCY_RESOLVERS_CONFIGURATION]
               [--beta-dependencies-directory BETA_DEPENDENCIES_DIRECTORY]
               [--beta-use-biocontainers] [--beta-conda-dependencies]
               [--tmpdir-prefix TMPDIR_PREFIX]
               [--tmp-outdir-prefix TMP_OUTDIR_PREFIX]
               jobStore cwltool ...
cwltoil: error: too few arguments

うおー!

ということで、 "困ったらクォートで括る" というお話でした。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?