I install python-apscheduler
, but dependent python-concurrent.futures
not installed.
Is this package bug?
Environment:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
$ python --version
Python 2.7.17
Procedure
Install python-apscheduler
$ sudo apt install python-apscheduler
Prepare the following script
$ cat a.py
from apscheduler.schedulers.blocking import BlockingScheduler
from apscheduler.executors.pool import ThreadPoolExecutor
if __name__ == '__main__':
print "hello"
If I execute it, an error will occur.
$ python a.py
Traceback (most recent call last):
File "a.py", line 1, in <module>
from apscheduler.schedulers.blocking import BlockingScheduler
File "/usr/lib/python2.7/dist-packages/apscheduler/schedulers/blocking.py", line 5, in <module>
from apscheduler.schedulers.base import BaseScheduler, STATE_STOPPED
File "/usr/lib/python2.7/dist-packages/apscheduler/schedulers/base.py", line 17, in <module>
from apscheduler.executors.pool import ThreadPoolExecutor
File "/usr/lib/python2.7/dist-packages/apscheduler/executors/pool.py", line 2, in <module>
import concurrent.futures
ImportError: No module named concurrent.futures
python-concurrent.futures
is not installed:
$ apt list --installed python-apscheduler python-concurrent.futures
Listing... Done
python-apscheduler/bionic,bionic,now 3.4.0-2ubuntu1 all [installed]
apt depends
doesn't show python-concurrent.futures
:
$ apt depends python-apscheduler
python-apscheduler
Depends: python-pkg-resources
Depends: python-six (>= 1.4.0)
Depends: python-tz
Depends: python-tzlocal
Depends: <python:any> (<< 2.8)
python:i386
python
Depends: <python:any> (>= 2.7.5-5~)
python:i386
python
Build-Depends: python-concurrent.futures
is written in debian/control
. I get apscheduler_3.4.0-2ubuntu1.debian.tar.xz from the package index.
See debian/control
:
Source: apscheduler
Section: python
Priority: optional
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
XSBC-Original-Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Build-Depends: debhelper (>= 11), dh-python,
python-all (>= 2.7),
python-setuptools, python-setuptools-scm,
python-concurrent.futures, python-tzlocal, python-six, python-pytest,
$ sudo add-apt-repository universe
said'universe' distribution component is already enabled for all sources.
I founddeb http://jp.archive.ubuntu.com/ubuntu/ bionic universe
in /etc/apt/sources.list. (I'm japanese) – miwarin May 16 '20 at 16:10