KiCost runtime error

I tried again running kicost from the console (Windows 10 Home) this’s the result:

kicost --debug 10


LibreOffice not found.
Loaded KiCost v.1.1.2
# Getting from XML 'USBAudio2.xml' KiCad BoM...
Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

BTW LibreOffice 6.3.0.4 is installed.

I found the problem … lxml package was missing… I installed trough pip it and now everything works. NB LibreOffice correctly opens and load up xslx file successfully (BTW the error shown with Excel is not showing here).

Nice to hear.
I add the lxml package to the KiCost installer requirements. This should not bother new users.

I can do something to fix LibreOffice detection ? (not a big issue … just wondering)

Talking about the “Convert to ODS” function in the GUI or the fact that LibreOffice doesn’t not execute the formulas at the file load?

No just :

LibreOffice not found.

message prompted from kicost (when run with debug level 10).
It’s indeed a false negative as a matter of fact LibreOffice is run automatically after xlsx file creation.

It is related if the function “Convert to ODS”, line 322 into kicost_gui.py. If LIbreOffice is installed, the GUI should active this option and not warning this message.

In Linux I try to execute libreoffice --version “at the prompt/terminal” to get this answer (is it LIbreOffice in the machine). I never tested on Windows or known if there is a better test to do.

Whats is the answer for libreoffice --version on Windows?

Try also this (on python):

from distutils.spawn import find_executable
print( find_executable('libreoffice') )

libreoffice --version cannot be run on Windows. For some reason LibreOffice main executable on Windows is called soffice.exe:

soffice.exe --version

LibreOffice 6.3.0.4 057fc023c990d676a43019934386b85b21a9ee99

Be aware that this output is not on the same console window but it spawn another separated console where the message is printed.

On Windows Libreoffice doesn’t add its binaries folder to global PATH variable during setup.
Only after I put C:\Program Files\Libreoffice\program to PATH find_executable returns something different from None:

Python 2.7.15 (default, Oct 11 2018, 12:09:51)  [GCC 8.2.0 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils.spawn import find_executable
>>> print( find_executable('soffice') )
C:\Program Files\LibreOffice\program\soffice.exe
>>> print( find_executable('libreoffice') )
None

Of course the binary to look for is soffice and not libreoffice as you can see.

So, to use the find_executable('soffice') check, the LibreOffice should be into the system PATH? (I have to find other way, cause this resource is mant to be to not experient users).

If you check by find_executable('C:\Program Files\LibreOffice\program\soffice.exe') or find_executable('C:\Program Files (x86)\LibreOffice\program\soffice.exe'), without put in th PATH, do you get some response?

Hi.

So, to use the find_executable('soffice') check, the LibreOffice should be into the system PATH? (I have to find other way, cause this resource is mant to be to not experient users).

Yes. I’m pretty sure LibreOffice installer doesn’t ask to add enviroment entries … anyway if it does it’s not a default action. I dont think there’s a practical workaround for this. Maybe you can ask user to locate soffice binary trough a dialog but the result can be awful.

If you check by find_executable('C:\Program Files\LibreOffice\program\soffice.exe') or find_executable('C:\Program Files (x86)\LibreOffice\program\soffice.exe') , without put in th PATH, do you get some response?

Just:
None

Into my virtual machine: is possible to check by “HKEY_LOCAL_MACHINE\SOFTWARE\LibreOFFICE\LibreOffice\%VERSION%\Path” to get the executable information.

This test need to be implemented into kicost_gui.py.

In the actual version, is the spreadsheet automatically opening in LibreOffice at the end of KiCost process?

Into my virtual machine: is possible to check by “HKEY_LOCAL_MACHINE\SOFTWARE\LibreOFFICE\LibreOffice%VERSION%\Path” to get the executable information.

good to know. I have to check it in my home setup.

In the actual version, is the spreadsheet automatically opening in LibreOffice at the end of KiCost process?

yes it is: probably because .xslx files extensions is bound to LibreOffice Calc executable.

Yes on my home computer the registry is entry is something like this:

Interesting also the entry UNO->InstallPath which hopefully doesn’t depend on LibreOffice version… (I guess).

I just pushed a fix, in case of Windows kicost_gui.py check all versions installed by this registry and use the last one.
@Michele_Santucci, do you mind to have a try and check/improve something? Mainly with you have other (or two simultaneous) versions of LibreOffice installed. (line 69 of kicost_gui.py)
Also re-check the kicost --setup and kicost --unsetup, they use the same Windows registry access that I moved to os_windows.py.

--setup now adds the ‘manf#’ and ‘variant’ fields to Eeschema template. This idea was really useful.

When I get a positive response this functions, I will release 1.1.2 on PyPI.

something’s gone wrong:

C:\WINDOWS\system32>pip install -U git+https://github.com/xesscorp/KiCost/
Collecting git+https://github.com/xesscorp/KiCost/
  Cloning https://github.com/xesscorp/KiCost/ to c:\users\weird.tux\appdata\local\temp\pip-req-build-46tsofk0
  Running command git clone -q https://github.com/xesscorp/KiCost/ 'C:\Users\weird.TUX\AppData\Local\Temp\pip-req-build-46tsofk0'
Requirement already satisfied, skipping upgrade: beautifulsoup4>=4.3.2 in c:\program files (x86)\python37-32\lib\site-packages (from kicost==1.1.2) (4.8.0)
Requirement already satisfied, skipping upgrade: lxml>=3.7.2 in c:\program files (x86)\python37-32\lib\site-packages (from kicost==1.1.2) (4.4.1)
Requirement already satisfied, skipping upgrade: XlsxWriter>=0.7.3 in c:\program files (x86)\python37-32\lib\site-packages (from kicost==1.1.2) (1.2.0)
Requirement already satisfied, skipping upgrade: future in c:\program files (x86)\python37-32\lib\site-packages (from kicost==1.1.2) (0.17.1)
Requirement already satisfied, skipping upgrade: tqdm>=4.30.0 in c:\program files (x86)\python37-32\lib\site-packages (from kicost==1.1.2) (4.35.0)
Requirement already satisfied, skipping upgrade: requests>=2.18.4 in c:\program files (x86)\python37-32\lib\site-packages (from kicost==1.1.2) (2.22.0)
Requirement already satisfied, skipping upgrade: CurrencyConverter>=0.13 in c:\program files (x86)\python37-32\lib\site-packages (from kicost==1.1.2) (0.13.9)
Requirement already satisfied, skipping upgrade: babel>=2.6 in c:\program files (x86)\python37-32\lib\site-packages (from kicost==1.1.2) (2.7.0)
Requirement already satisfied, skipping upgrade: soupsieve>=1.2 in c:\program files (x86)\python37-32\lib\site-packages (from beautifulsoup4>=4.3.2->kicost==1.1.2) (1.9.3)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\program files (x86)\python37-32\lib\site-packages (from requests>=2.18.4->kicost==1.1.2) (1.25.3)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in c:\program files (x86)\python37-32\lib\site-packages (from requests>=2.18.4->kicost==1.1.2) (2019.6.16)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in c:\program files (x86)\python37-32\lib\site-packages (from requests>=2.18.4->kicost==1.1.2) (2.8)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in c:\program files (x86)\python37-32\lib\site-packages (from requests>=2.18.4->kicost==1.1.2) (3.0.4)
Requirement already satisfied, skipping upgrade: pytz>=2015.7 in c:\program files (x86)\python37-32\lib\site-packages (from babel>=2.6->kicost==1.1.2) (2019.2)
Installing collected packages: kicost
  Running setup.py install for kicost ... done
Successfully installed kicost-1.1.2

C:\WINDOWS\system32>kicost --setup
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\Scripts\kicost-script.py", line 11, in <module>
    load_entry_point('kicost==1.1.2', 'console_scripts', 'kicost')()
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 2411, in load
    return self.resolve()
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\program files (x86)\python37-32\lib\site-packages\kicost\__main__.py", line 38, in <module>
    from .kicost_gui import * # User guide.
  File "c:\program files (x86)\python37-32\lib\site-packages\kicost\kicost_gui.py", line 77, in <module>
    libreoffice_installations.sort(key=StrictVersion)
AttributeError: 'NoneType' object has no attribute 'sort'

C:\WINDOWS\system32>kicost --unsetup
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\Scripts\kicost-script.py", line 11, in <module>
    load_entry_point('kicost==1.1.2', 'console_scripts', 'kicost')()
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 2411, in load
    return self.resolve()
  File "c:\program files (x86)\python37-32\lib\site-packages\pkg_resources\__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\program files (x86)\python37-32\lib\site-packages\kicost\__main__.py", line 38, in <module>
    from .kicost_gui import * # User guide.
  File "c:\program files (x86)\python37-32\lib\site-packages\kicost\kicost_gui.py", line 77, in <module>
    libreoffice_installations.sort(key=StrictVersion)
AttributeError: 'NoneType' object has no attribute 'sort'

maybe I have to try pip from kicad\bin folder?

uh… nope it gets even worst:

C:\Program Files\KiCad\bin>pip install -U git+https://github.com/xesscorp/KiCost/
Collecting git+https://github.com/xesscorp/KiCost/
  Cloning https://github.com/xesscorp/KiCost/ to c:\users\weird.tux\appdata\local\temp\pip-req-build-ucqpxr
Requirement already satisfied, skipping upgrade: beautifulsoup4>=4.3.2 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (4.8.0)
Collecting lxml>=3.7.2 (from kicost==1.1.2)
  Cache entry deserialization failed, entry ignored
  Using cached https://files.pythonhosted.org/packages/c4/43/3f1e7d742e2a7925be180b6af5e0f67d38de2f37560365ac1a0b9a04c015/lxml-4.4.1.tar.gz
Requirement already satisfied, skipping upgrade: XlsxWriter>=0.7.3 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (1.2.1)
Requirement already satisfied, skipping upgrade: future in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (0.17.1)
Requirement already satisfied, skipping upgrade: tqdm>=4.30.0 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (4.36.1)
Requirement already satisfied, skipping upgrade: requests>=2.18.4 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (2.20.0)
Requirement already satisfied, skipping upgrade: CurrencyConverter>=0.13 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (0.13.10)
Requirement already satisfied, skipping upgrade: babel>=2.6 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (2.7.0)
Requirement already satisfied, skipping upgrade: soupsieve>=1.2 in c:\program files\kicad\lib\python2.7\site-packages (from beautifulsoup4>=4.3.2->kicost==1.1.2) (1.9.3)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in c:\program files\kicad\lib\python2.7\site-packages (from requests>=2.18.4->kicost==1.1.2) (3.0.4)
Requirement already satisfied, skipping upgrade: idna<2.8,>=2.5 in c:\program files\kicad\lib\python2.7\site-packages (from requests>=2.18.4->kicost==1.1.2) (2.7)
Requirement already satisfied, skipping upgrade: urllib3<1.25,>=1.21.1 in c:\program files\kicad\lib\python2.7\site-packages (from requests>=2.18.4->kicost==1.1.2) (1.24)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in c:\program files\kicad\lib\python2.7\site-packages (from requests>=2.18.4->kicost==1.1.2) (2018.10.15)
Requirement already satisfied, skipping upgrade: pytz>=2015.7 in c:\program files\kicad\lib\python2.7\site-packages (from babel>=2.6->kicost==1.1.2) (2019.2)
Requirement already satisfied, skipping upgrade: backports.functools-lru-cache; python_version < "3" in c:\program files\kicad\lib\python2.7\site-packages (from soupsieve>=1.2->beautifulsoup4>=4.3.2->kicost==1.1.2) (1.5)
Installing collected packages: lxml, kicost
  Running setup.py install for lxml ... error
    Complete output from command "C:/Program Files/KiCad/bin/python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\weird.tux\\appdata\\local\\temp\\pip-install-xx6vnb\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\weird.tux\appdata\local\temp\pip-record-yvzgcg\install-record.txt --single-version-externally-managed --compile:
    Building lxml version 4.4.1.
    Building without Cython.
    ERROR: "xslt-config" non \u0160 riconosciuto come comando interno o esterno,
     un programma eseguibile o un file batch.

    ** 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.mingw-2.7
    creating build\lib.mingw-2.7\lxml
    copying src\lxml\builder.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\cssselect.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\doctestcompare.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\ElementInclude.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\pyclasslookup.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\sax.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\usedoctest.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\_elementpath.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\__init__.py -> build\lib.mingw-2.7\lxml
    creating build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\__init__.py -> build\lib.mingw-2.7\lxml\includes
    creating build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\builder.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\clean.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\defs.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\diff.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\ElementSoup.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\formfill.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\html5parser.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\soupparser.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\usedoctest.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\_diffcommand.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\_html5builder.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\_setmixin.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\__init__.py -> build\lib.mingw-2.7\lxml\html
    creating build\lib.mingw-2.7\lxml\isoschematron
    copying src\lxml\isoschematron\__init__.py -> build\lib.mingw-2.7\lxml\isoschematron
    copying src\lxml\etree.h -> build\lib.mingw-2.7\lxml
    copying src\lxml\etree_api.h -> build\lib.mingw-2.7\lxml
    copying src\lxml\lxml.etree.h -> build\lib.mingw-2.7\lxml
    copying src\lxml\lxml.etree_api.h -> build\lib.mingw-2.7\lxml
    copying src\lxml\includes\c14n.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\config.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\dtdvalid.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\etreepublic.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\htmlparser.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\relaxng.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\schematron.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\tree.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\uri.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xinclude.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xmlerror.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xmlparser.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xmlschema.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xpath.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xslt.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\__init__.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\etree_defs.h -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\lxml-version.h -> build\lib.mingw-2.7\lxml\includes
    creating build\lib.mingw-2.7\lxml\isoschematron\resources
    creating build\lib.mingw-2.7\lxml\isoschematron\resources\rng
    copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.mingw-2.7\lxml\isoschematron\resources\rng
    creating build\lib.mingw-2.7\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl
    creating build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    running build_ext
    building 'lxml.etree' extension
    creating build\temp.mingw-2.7
    creating build\temp.mingw-2.7\src
    creating build\temp.mingw-2.7\src\lxml
    x86_64-w64-mingw32-gcc -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -DNDEBUG -DNDEBUG -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc\lxml\includes "-IC:\Program Files\KiCad\include\python2.7" -c src\lxml\etree.c -o build\temp.mingw-2.7\src\lxml\etree.o -w
    Compile failed: command 'x86_64-w64-mingw32-gcc' failed: No such file or directory
    creating users
    creating users\weird.tux
    creating users\weird.tux\appdata
    creating users\weird.tux\appdata\local
    creating users\weird.tux\appdata\local\temp
    gcc -mno-cygwin -mdll -O2 -Wall -I/usr/include/libxml2 -c c:\users\weird.tux\appdata\local\temp\xmlXPathInit4lqmm1.c -o users\weird.tux\appdata\local\temp\xmlXPathInit4lqmm1.o
    *********************************************************************************
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    *********************************************************************************
    error: command 'x86_64-w64-mingw32-gcc' failed: No such file or directory

    ----------------------------------------
Command ""C:/Program Files/KiCad/bin/python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\weird.tux\\appdata\\local\\temp\\pip-install-xx6vnb\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\weird.tux\appdata\local\temp\pip-record-yvzgcg\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\weird.tux\appdata\local\temp\pip-install-xx6vnb\lxml\

C:\Program Files\KiCad\bin>pip uninstall kicost
Uninstalling kicost-1.1.1:
  Would remove:
    c:\program files\kicad\bin\kicost.exe
    c:\program files\kicad\lib\python2.7\site-packages\kicost-1.1.1.dist-info\*
    c:\program files\kicad\lib\python2.7\site-packages\kicost\*
    c:\program files\kicad\lib\python2.7\site-packages\tests\*
Proceed (y/n)? y
  Successfully uninstalled kicost-1.1.1

C:\Program Files\KiCad\bin>pip install libxml2
Collecting libxml2
  Could not find a version that satisfies the requirement libxml2 (from versions: )
No matching distribution found for libxml2

C:\Program Files\KiCad\bin>pip install -U git+https://github.com/xesscorp/KiCost/
Collecting git+https://github.com/xesscorp/KiCost/
  Cloning https://github.com/xesscorp/KiCost/ to c:\users\weird.tux\appdata\local\temp\pip-req-build-p7d2bb
Requirement already satisfied, skipping upgrade: beautifulsoup4>=4.3.2 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (4.8.0)
Collecting lxml>=3.7.2 (from kicost==1.1.2)
  Using cached https://files.pythonhosted.org/packages/c4/43/3f1e7d742e2a7925be180b6af5e0f67d38de2f37560365ac1a0b9a04c015/lxml-4.4.1.tar.gz
Requirement already satisfied, skipping upgrade: XlsxWriter>=0.7.3 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (1.2.1)
Requirement already satisfied, skipping upgrade: future in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (0.17.1)
Requirement already satisfied, skipping upgrade: tqdm>=4.30.0 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (4.36.1)
Requirement already satisfied, skipping upgrade: requests>=2.18.4 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (2.20.0)
Requirement already satisfied, skipping upgrade: CurrencyConverter>=0.13 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (0.13.10)
Requirement already satisfied, skipping upgrade: babel>=2.6 in c:\program files\kicad\lib\python2.7\site-packages (from kicost==1.1.2) (2.7.0)
Requirement already satisfied, skipping upgrade: soupsieve>=1.2 in c:\program files\kicad\lib\python2.7\site-packages (from beautifulsoup4>=4.3.2->kicost==1.1.2) (1.9.3)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in c:\program files\kicad\lib\python2.7\site-packages (from requests>=2.18.4->kicost==1.1.2) (3.0.4)
Requirement already satisfied, skipping upgrade: idna<2.8,>=2.5 in c:\program files\kicad\lib\python2.7\site-packages (from requests>=2.18.4->kicost==1.1.2) (2.7)
Requirement already satisfied, skipping upgrade: urllib3<1.25,>=1.21.1 in c:\program files\kicad\lib\python2.7\site-packages (from requests>=2.18.4->kicost==1.1.2) (1.24)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in c:\program files\kicad\lib\python2.7\site-packages (from requests>=2.18.4->kicost==1.1.2) (2018.10.15)
Requirement already satisfied, skipping upgrade: pytz>=2015.7 in c:\program files\kicad\lib\python2.7\site-packages (from babel>=2.6->kicost==1.1.2) (2019.2)
Requirement already satisfied, skipping upgrade: backports.functools-lru-cache; python_version < "3" in c:\program files\kicad\lib\python2.7\site-packages (from soupsieve>=1.2->beautifulsoup4>=4.3.2->kicost==1.1.2) (1.5)
Installing collected packages: lxml, kicost
  Running setup.py install for lxml ... error
    Complete output from command "C:/Program Files/KiCad/bin/python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\weird.tux\\appdata\\local\\temp\\pip-install-v23d9y\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\weird.tux\appdata\local\temp\pip-record-aawaxk\install-record.txt --single-version-externally-managed --compile:
    Building lxml version 4.4.1.
    Building without Cython.
    ERROR: "xslt-config" non \u0160 riconosciuto come comando interno o esterno,
     un programma eseguibile o un file batch.

    ** 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.mingw-2.7
    creating build\lib.mingw-2.7\lxml
    copying src\lxml\builder.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\cssselect.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\doctestcompare.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\ElementInclude.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\pyclasslookup.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\sax.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\usedoctest.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\_elementpath.py -> build\lib.mingw-2.7\lxml
    copying src\lxml\__init__.py -> build\lib.mingw-2.7\lxml
    creating build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\__init__.py -> build\lib.mingw-2.7\lxml\includes
    creating build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\builder.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\clean.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\defs.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\diff.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\ElementSoup.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\formfill.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\html5parser.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\soupparser.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\usedoctest.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\_diffcommand.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\_html5builder.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\_setmixin.py -> build\lib.mingw-2.7\lxml\html
    copying src\lxml\html\__init__.py -> build\lib.mingw-2.7\lxml\html
    creating build\lib.mingw-2.7\lxml\isoschematron
    copying src\lxml\isoschematron\__init__.py -> build\lib.mingw-2.7\lxml\isoschematron
    copying src\lxml\etree.h -> build\lib.mingw-2.7\lxml
    copying src\lxml\etree_api.h -> build\lib.mingw-2.7\lxml
    copying src\lxml\lxml.etree.h -> build\lib.mingw-2.7\lxml
    copying src\lxml\lxml.etree_api.h -> build\lib.mingw-2.7\lxml
    copying src\lxml\includes\c14n.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\config.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\dtdvalid.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\etreepublic.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\htmlparser.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\relaxng.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\schematron.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\tree.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\uri.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xinclude.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xmlerror.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xmlparser.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xmlschema.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xpath.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\xslt.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\__init__.pxd -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\etree_defs.h -> build\lib.mingw-2.7\lxml\includes
    copying src\lxml\includes\lxml-version.h -> build\lib.mingw-2.7\lxml\includes
    creating build\lib.mingw-2.7\lxml\isoschematron\resources
    creating build\lib.mingw-2.7\lxml\isoschematron\resources\rng
    copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.mingw-2.7\lxml\isoschematron\resources\rng
    creating build\lib.mingw-2.7\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl
    copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl
    creating build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.mingw-2.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
    running build_ext
    building 'lxml.etree' extension
    creating build\temp.mingw-2.7
    creating build\temp.mingw-2.7\src
    creating build\temp.mingw-2.7\src\lxml
    x86_64-w64-mingw32-gcc -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -DNDEBUG -DNDEBUG -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc\lxml\includes "-IC:\Program Files\KiCad\include\python2.7" -c src\lxml\etree.c -o build\temp.mingw-2.7\src\lxml\etree.o -w
    Compile failed: command 'x86_64-w64-mingw32-gcc' failed: No such file or directory
    creating users
    creating users\weird.tux
    creating users\weird.tux\appdata
    creating users\weird.tux\appdata\local
    creating users\weird.tux\appdata\local\temp
    gcc -mno-cygwin -mdll -O2 -Wall -I/usr/include/libxml2 -c c:\users\weird.tux\appdata\local\temp\xmlXPathInitmouzjn.c -o users\weird.tux\appdata\local\temp\xmlXPathInitmouzjn.o
    *********************************************************************************
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    *********************************************************************************
    error: command 'x86_64-w64-mingw32-gcc' failed: No such file or directory

    ----------------------------------------
Command ""C:/Program Files/KiCad/bin/python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\weird.tux\\appdata\\local\\temp\\pip-install-v23d9y\\lxml\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\weird.tux\appdata\local\temp\pip-record-aawaxk\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\weird.tux\appdata\local\temp\pip-install-v23d9y\lxml\

have to rollback on kicost 1.1

The problem seems to be a miissing binary: x86_64-w64-mingw32-gcc of course but … it’s not reported as a requirements. I’m also pretty sure that in my home setup I have cygwin4 installed which include gcc package (is it possibile to use this distribution instead myngw32?).
I have also a doubt about the double Python setup I have: the actual Python distribution is installed in C:\Program Files\Python37\ and the second is inside Kicad bin folder. Could this configuration interfere with kicost functionality?