I followed the install directions as carefully I could from the web page Wolfram Client Library forPython but got a syntax error several levels deep in the client library. What might be wrong?
Here is the output from the Python shell under Raspbian on a Pi 3:
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "copyright", "credits" or "license()" for more information.
>>> from wolframclient.evaluation import WolframLanguageSession
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from wolframclient.evaluation import WolframLanguageSession
File "/usr/local/lib/python3.5/dist-packages/wolframclient/evaluation/__init__.py", line 5, in <module>
from wolframclient.evaluation.cloud import (
File "/usr/local/lib/python3.5/dist-packages/wolframclient/evaluation/cloud/__init__.py", line 5, in <module>
from wolframclient.evaluation.cloud.cloudsession import WolframAPICall, WolframCloudSession
File "/usr/local/lib/python3.5/dist-packages/wolframclient/evaluation/cloud/cloudsession.py", line 14, in <module>
from wolframclient.evaluation.result import (
File "/usr/local/lib/python3.5/dist-packages/wolframclient/evaluation/result.py", line 373
yield msg
^
SyntaxError: 'yield' inside async function
>>>
Here is the console log from installing wolframclient:
pi@raspberrypi:~ $ sudo pip3 install wolframclient
Collecting wolframclient
Downloading https://files.pythonhosted.org/packages/2e/01/0d51ce2b1e766acfa17355cc99c7cab2190783542c8ed085260f7c19d8a5/wolframclient-1.0.2-py2.py3-none-any.whl (827kB)
100% |????????????????????????????????| 829kB 321kB/s
Requirement already satisfied: pip in /usr/lib/python3/dist-packages (from wolframclient)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from wolframclient)
Requirement already satisfied: oauthlib in /usr/lib/python3/dist-packages (from wolframclient)
Collecting pytz (from wolframclient)
Downloading https://files.pythonhosted.org/packages/3d/73/fe30c2daaaa0713420d0382b16fbb761409f532c56bdcc514bf7b6262bb6/pytz-2019.1-py2.py3-none-any.whl (510kB)
100% |????????????????????????????????| 512kB 517kB/s
Collecting zmq (from wolframclient)
Downloading https://www.piwheels.org/simple/zmq/zmq-0.0.0-py3-none-any.whl
Collecting aiohttp (from wolframclient)
Downloading https://www.piwheels.org/simple/aiohttp/aiohttp-3.5.4-cp35-cp35m-linux_armv7l.whl (1.1MB)
100% |????????????????????????????????| 1.1MB 242kB/s
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from wolframclient)
Collecting pyzmq (from zmq->wolframclient)
Downloading https://files.pythonhosted.org/packages/f8/48/5416696b9f2eacc7d1f9fe3a7187ad54d769e09585ec0b59c137ab5c7575/pyzmq-18.0.1.tar.gz (1.2MB)
100% |????????????????????????????????| 1.2MB 208kB/s
Collecting async-timeout<4.0,>=3.0 (from aiohttp->wolframclient)
Downloading https://files.pythonhosted.org/packages/e1/1e/5a4441be21b0726c4464f3f23c8b19628372f606755a9d2e46c187e65ec4/async_timeout-3.0.1-py3-none-any.whl
Collecting typing-extensions>=3.6.5; python_version < "3.7" (from aiohttp->wolframclient)
Downloading https://files.pythonhosted.org/packages/0f/62/c66e553258c37c33f9939abb2dd8d2481803d860ff68e635466f12aa7efa/typing_extensions-3.7.2-py3-none-any.whl
Collecting yarl<2.0,>=1.0 (from aiohttp->wolframclient)
Downloading https://www.piwheels.org/simple/yarl/yarl-1.3.0-cp35-cp35m-linux_armv7l.whl (227kB)
100% |????????????????????????????????| 235kB 485kB/s
Requirement already satisfied: chardet<4.0,>=2.0 in /usr/lib/python3/dist-packages (from aiohttp->wolframclient)
Collecting idna-ssl>=1.0; python_version < "3.7" (from aiohttp->wolframclient)
Downloading https://www.piwheels.org/simple/idna-ssl/idna_ssl-1.1.0-py3-none-any.whl
Collecting multidict<5.0,>=4.0 (from aiohttp->wolframclient)
Downloading https://www.piwheels.org/simple/multidict/multidict-4.5.2-cp35-cp35m-linux_armv7l.whl (301kB)
100% |????????????????????????????????| 307kB 540kB/s
Collecting attrs>=17.3.0 (from aiohttp->wolframclient)
Downloading https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl
Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from yarl<2.0,>=1.0->aiohttp->wolframclient)
Building wheels for collected packages: pyzmq
Running setup.py bdist_wheel for pyzmq ... done
Stored in directory: /root/.cache/pip/wheels/45/76/9a/c8323139cd1d805c76f8cae94408675fc06b911ebf626b8753
Successfully built pyzmq
Installing collected packages: pytz, pyzmq, zmq, async-timeout, typing-extensions, multidict, yarl, idna-ssl, attrs, aiohttp, wolframclient
Successfully installed aiohttp-3.5.4 async-timeout-3.0.1 attrs-19.1.0 idna-ssl-1.1.0 multidict-4.5.2 pytz-2019.1 pyzmq-18.0.1 typing-extensions-3.7.2 wolframclient-1.0.2 yarl-1.3.0 zmq-0.0.0
pi@raspberrypi:~ $
This is the Raspbian version information:
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
pi@raspberrypi:~ $