APScheduler on raspberry pi Python3 install fails

719 views
Skip to first unread message

pieter...@gmail.com

unread,
Feb 11, 2017, 3:55:56 AM2/11/17
to APScheduler
I have used APScheduler under Python2 for a long time. It still works perfect for me. But...

For a new project I want to start with Python3. Installing APScheduler on a fresh jessie configuration causes an error.
I used the command  "sudo pip3 install apscheduler==3.3.1"to install APScheduler:

Downloading/unpacking apscheduler==3.3.1
  Downloading APScheduler-3.3.1-py2.py3-none-any.whl (56kB): 56kB downloaded
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.0 in /usr/lib/python3/dist-packages (from apscheduler==3.3.1)
Downloading/unpacking tzlocal>=1.2 (from apscheduler==3.3.1)
  Downloading tzlocal-1.3.tar.gz
  Running setup.py (path:/tmp/pip-build-ftz1ppk5/tzlocal/setup.py) egg_info for package tzlocal

Downloading/unpacking pytz (from apscheduler==3.3.1)
  Downloading pytz-2016.10-py2.py3-none-any.whl (483kB): 483kB downloaded
Requirement already satisfied (use --upgrade to upgrade): setuptools>=0.7 in /usr/lib/python3/dist-packages (from apscheduler==3.3.1)
Installing collected packages: apscheduler, tzlocal, pytz
*** Error compiling '/tmp/pip-build-ftz1ppk5/apscheduler/apscheduler/executors/base_py3.py'...
  File "/tmp/pip-build-ftz1ppk5/apscheduler/apscheduler/executors/base_py3.py", line 12
    async def run_coroutine_job(job, jobstore_alias, run_times, logger_name):
            ^
SyntaxError: invalid syntax

  Running setup.py install for tzlocal

Successfully installed apscheduler tzlocal pytz
Cleaning up...


In a testprogram the line:   "from apscheduler.scheduler import Scheduler" causes an error: 
pi@raspberrypi:~ $ python3 testp3.py
Traceback (most recent call last):
  File "testp3.py", line 3, in <module>
    from apscheduler.scheduler import Scheduler

Clearly the installation went wrong.

Can anyone help me? Thanks in advance!

Alex Grönholm

unread,
Feb 11, 2017, 5:20:57 AM2/11/17
to apsch...@googlegroups.com

The installation didn't go wrong. The first error you saw was due to precompilation of one module which uses 3.5+ syntax but which is not used on older Pythons anyway. The import, on the other hand, failed because you didn't read the documentation and tried to use code written for APScheduler 2.x or older.

--
You received this message because you are subscribed to the Google Groups "APScheduler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apscheduler...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pieter...@gmail.com

unread,
Feb 11, 2017, 7:30:11 AM2/11/17
to APScheduler
Alex

You are right, I did not read the manual. Sorry...
Works now, Thanks a lot!

Pieter

Op zaterdag 11 februari 2017 11:20:57 UTC+1 schreef Alex Grönholm:
Reply all
Reply to author
Forward
0 new messages