Thanks for all your work @AnderssonPeter!
I’m trying to install pytrafikverket but gettting some errors.
Here is the output in my terminal after running:
> sudo pip3 install pytrafikverket
Downloading/unpacking pytrafikverket
Downloading pytrafikverket-0.1.4-py3-none-any.whl
Downloading/unpacking aiohttp (from pytrafikverket)
Downloading aiohttp-2.0.7.tar.gz (739kB): 739kB downloaded
Running setup.py (path:/tmp/pip-build-es5g1i6l/aiohttp/setup.py) egg_info for package aiohttp
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'aiohttp/_multidict.html'
warning: no previously-included files found matching 'aiohttp/_multidict.*.so'
warning: no previously-included files found matching 'aiohttp/_multidict.pyd'
warning: no previously-included files found matching 'aiohttp/_multidict.*.pyd'
warning: no previously-included files found matching 'aiohttp/_websocket.html'
warning: no previously-included files found matching 'aiohttp/_websocket.*.so'
warning: no previously-included files found matching 'aiohttp/_websocket.pyd'
warning: no previously-included files found matching 'aiohttp/_websocket.*.pyd'
no previously-included directories found matching 'docs/_build'
Downloading/unpacking async-timeout (from pytrafikverket)
Downloading async_timeout-1.2.1-py3-none-any.whl
Downloading/unpacking lxml (from pytrafikverket)
Downloading lxml-3.7.3.tar.gz (3.8MB): 3.8MB downloaded
Running setup.py (path:/tmp/pip-build-es5g1i6l/lxml/setup.py) egg_info for package lxml
Building lxml version 3.7.3.
Building without Cython.
ERROR: b'/bin/sh: 1: xslt-config: not found\n'
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
warning: no previously-included files found matching '*.py'
Requirement already satisfied (use --upgrade to upgrade): chardet in /usr/lib/python3/dist-packages (from aiohttp->pytrafikverket)
Downloading/unpacking multidict>=2.1.4 (from aiohttp->pytrafikverket)
Downloading multidict-2.1.5.tar.gz (101kB): 101kB downloaded
Running setup.py (path:/tmp/pip-build-es5g1i6l/multidict/setup.py) egg_info for package multidict
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'multidict/_multidict.html'
warning: no previously-included files found matching 'multidict/_multidict.*.so'
warning: no previously-included files found matching 'multidict/_multidict.pyd'
warning: no previously-included files found matching 'multidict/_multidict.*.pyd'
no previously-included directories found matching 'docs/_build'
Downloading/unpacking yarl>=0.10.0,<0.11 (from aiohttp->pytrafikverket)
Downloading yarl-0.10.2.tar.gz (127kB): 127kB downloaded
Running setup.py (path:/tmp/pip-build-es5g1i6l/yarl/setup.py) egg_info for package yarl
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl/_quoting.html'
warning: no previously-included files found matching 'yarl/_quoting.*.so'
warning: no previously-included files found matching 'yarl/_quoting.pyd'
warning: no previously-included files found matching 'yarl/_quoting.*.pyd'
no previously-included directories found matching 'docs/_build'
Installing collected packages: pytrafikverket, aiohttp, async-timeout, lxml, multidict, yarl
*** Error compiling '/tmp/pip-build-es5g1i6l/pytrafikverket/pytrafikverket/__main__.py'...
File "/tmp/pip-build-es5g1i6l/pytrafikverket/pytrafikverket/__main__.py", line 13
async def async_main(loop):
^
SyntaxError: invalid syntax
*** Error compiling '/tmp/pip-build-es5g1i6l/pytrafikverket/pytrafikverket/trafikverket.py'...
File "/tmp/pip-build-es5g1i6l/pytrafikverket/pytrafikverket/trafikverket.py", line 114
async def make_request(self, objecttype:str,
^
SyntaxError: invalid syntax
*** Error compiling '/tmp/pip-build-es5g1i6l/pytrafikverket/pytrafikverket/trafikverket_train.py'...
File "/tmp/pip-build-es5g1i6l/pytrafikverket/pytrafikverket/trafikverket_train.py", line 98
async def get_train_station(self, location_name: str) -> StationInfo:
^
SyntaxError: invalid syntax
Running setup.py install for aiohttp
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching 'aiohttp/_multidict.html'
warning: no previously-included files found matching 'aiohttp/_multidict.*.so'
warning: no previously-included files found matching 'aiohttp/_multidict.pyd'
warning: no previously-included files found matching 'aiohttp/_multidict.*.pyd'
warning: no previously-included files found matching 'aiohttp/_websocket.html'
warning: no previously-included files found matching 'aiohttp/_websocket.*.so'
warning: no previously-included files found matching 'aiohttp/_websocket.pyd'
warning: no previously-included files found matching 'aiohttp/_websocket.*.pyd'
no previously-included directories found matching 'docs/_build'
building 'aiohttp._websocket' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c aiohttp/_websocket.c -o build/temp.linux-armv7l-3.4/aiohttp/_websocket.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/aiohttp/_websocket.o -o build/lib.linux-armv7l-3.4/aiohttp/_websocket.cpython-34m.so
building 'aiohttp._http_parser' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c aiohttp/_http_parser.c -o build/temp.linux-armv7l-3.4/aiohttp/_http_parser.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c vendor/http-parser/http_parser.c -o build/temp.linux-armv7l-3.4/vendor/http-parser/http_parser.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.4/aiohttp/_http_parser.o build/temp.linux-armv7l-3.4/vendor/http-parser/http_parser.o -o build/lib.linux-armv7l-3.4/aiohttp/_http_parser.cpython-34m.so
Running setup.py install for lxml
Building lxml version 3.7.3.
Building without Cython.
ERROR: b'/bin/sh: 1: xslt-config: not found\n'
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
building 'lxml.etree' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Isrc/lxml/includes -I/usr/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-armv7l-3.4/src/lxml/lxml.etree.o -w
In file included from src/lxml/lxml.etree.c:515:0:
src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
#include "libxml/xmlversion.h"
^
compilation terminated.
Compile failed: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInit026iqbts.c -o tmp/xmlXPathInit026iqbts.o
/tmp/xmlXPathInit026iqbts.c:1:26: fatal error: libxml/xpath.h: No such file or directory
#include "libxml/xpath.h"
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-es5g1i6l/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-s3s88v19-record/install-record.txt --single-version-externally-managed --compile:
Building lxml version 3.7.3.
Building without Cython.
ERROR: b'/bin/sh: 1: xslt-config: not found\n'
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.4
creating build/lib.linux-armv7l-3.4/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-armv7l-3.4/lxml
copying src/lxml/cssselect.py -> build/lib.linux-armv7l-3.4/lxml
copying src/lxml/sax.py -> build/lib.linux-armv7l-3.4/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-armv7l-3.4/lxml
copying src/lxml/builder.py -> build/lib.linux-armv7l-3.4/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-armv7l-3.4/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-armv7l-3.4/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-armv7l-3.4/lxml
copying src/lxml/__init__.py -> build/lib.linux-armv7l-3.4/lxml
creating build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.linux-armv7l-3.4/lxml/includes
creating build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/__init__.py -> build/lib.linux-armv7l-3.4/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-armv7l-3.4/lxml/html
creating build/lib.linux-armv7l-3.4/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.linux-armv7l-3.4/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.linux-armv7l-3.4/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-armv7l-3.4/lxml
copying src/lxml/includes/xslt.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-armv7l-3.4/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-armv7l-3.4/lxml/includes
creating build/lib.linux-armv7l-3.4/lxml/isoschematron/resources
creating build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/rng
creating build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/xsl
creating build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-armv7l-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-armv7l-3.4
creating build/temp.linux-armv7l-3.4/src
creating build/temp.linux-armv7l-3.4/src/lxml
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Isrc/lxml/includes -I/usr/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-armv7l-3.4/src/lxml/lxml.etree.o -w
In file included from src/lxml/lxml.etree.c:515:0:
src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
#include "libxml/xmlversion.h"
^
compilation terminated.
Compile failed: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
creating tmp
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInit026iqbts.c -o tmp/xmlXPathInit026iqbts.o
/tmp/xmlXPathInit026iqbts.c:1:26: fatal error: libxml/xpath.h: No such file or directory
#include "libxml/xpath.h"
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
----------------------------------------
Cleaning up...
Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-es5g1i6l/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-s3s88v19-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-es5g1i6l/lxml
Storing debug log for failure in /root/.pip/pip.log
My linux knowledge and experiance is very limited, but it seems to be some problem with libxml2 and libxslt?
libxml2 is installed and updated, not sure about libxlst thou.
Any ideas?