Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pip install fails on windows #48

Open
RobertoRoos opened this issue Feb 19, 2021 · 7 comments
Open

Pip install fails on windows #48

RobertoRoos opened this issue Feb 19, 2021 · 7 comments
Assignees

Comments

@RobertoRoos
Copy link

I figured this deserves it's own issue.
Installation with on Windows fails (output below).

The documentation mentions a binary wheel that will be downloaded, but the installer complains about build errors, which shouldn't happen if there is no need to build anything.

pip install ingenialink==5.1.0
Collecting ingenialink==5.1.0
Using cached ingenialink-5.1.0.tar.gz (31 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\roosra\source\symbitron\ingenialinkadvancedfeatures\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\RoosRA\AppData\Local\Temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600\setup.py'"'"'; file='"'"'C:\Users\RoosRA\AppData\Local\Temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\RoosRA\AppData\Local\Temp\pip-pip-egg-info-k9mhnh8k'
cwd: C:\Users\RoosRA\AppData\Local\Temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600
Complete output (91 lines):
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
Cloning into '_deps\ingenialink'...
Note: switching to 'd83bde790eb430d5fdfbfb0e476507e68afda465'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Submodule 'external/libxml2/libxml2' (https://github.com/GNOME/libxml2.git) registered for path 'external/libxml2/libxml2'
Submodule 'external/sercomm' (https://github.com/ingeniamc/sercomm.git) registered for path 'external/sercomm'
Cloning into 'C:/Users/RoosRA/AppData/Local/Temp/pip-install-pkvb0kar/ingenialink_c81e97608c284c76a5abdc7edfa24600/_deps/ingenialink/external/libxml2/libxml2'...
Cloning into 'C:/Users/RoosRA/AppData/Local/Temp/pip-install-pkvb0kar/ingenialink_c81e97608c284c76a5abdc7edfa24600/_deps/ingenialink/external/sercomm'...
Submodule path 'external/libxml2/libxml2': checked out 'bc5a5d658320c37e206fe4e7b525b4a24466d0c6'
Submodule path 'external/sercomm': checked out 'dd1f999884ec4202c6b42d623efdc5eabf1753fe'
Submodule 'docs/template' (https://github.com/ingeniamc/doxygen-template.git) registered for path 'external/sercomm/docs/template'
Cloning into 'C:/Users/RoosRA/AppData/Local/Temp/pip-install-pkvb0kar/ingenialink_c81e97608c284c76a5abdc7edfa24600/_deps/ingenialink/external/sercomm/docs/template'...
Submodule path 'external/sercomm/docs/template': checked out '9b4d271575c1a0393f1f53fbfc0e4ea1096f58e3'
-- Selecting Windows SDK version  to target Windows 10.0.19041.
CMake Error at CMakeLists.txt:30 (project):
  Failed to run MSBuild command:

    C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

  to get the value of VCTargetsPath:

    Microsoft (R) Build Engine version 14.0.23107.0
    Copyright (C) Microsoft Corporation. All rights reserved.

    Build started 19/02/2021 08:10:30.
    Project "C:\Users\RoosRA\AppData\Local\Temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj" on node 1 (default targets).
    C:\Users\RoosRA\AppData\Local\Temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
    Done Building Project "C:\Users\RoosRA\AppData\Local\Temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj" (default targets) -- FAILED.

    Build FAILED.

    "C:\Users\RoosRA\AppData\Local\Temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj" (default target) (1) ->
      C:\Users\RoosRA\AppData\Local\Temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:00.13


  Exit code: 1



-- Configuring incomplete, errors occurred!
See also "C:/Users/RoosRA/AppData/Local/Temp/pip-install-pkvb0kar/ingenialink_c81e97608c284c76a5abdc7edfa24600/_build/sercomm/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\RoosRA\AppData\Local\Temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600\setup.py", line 9, in <module>
    setup(name='ingenialink',
  File "c:\users\roosra\source\symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Program Files (x86)\Python38-32\lib\distutils\core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "c:\users\roosra\source\symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\dist.py", line 432, in __init__
    _Distribution.__init__(self, {
  File "C:\Program Files (x86)\Python38-32\lib\distutils\dist.py", line 292, in __init__
    self.finalize_options()
  File "c:\users\roosra\source\symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\dist.py", line 708, in finalize_options
    ep(self)
  File "c:\users\roosra\source\symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\dist.py", line 715, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "c:\users\roosra\appdata\local\temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600\.eggs\cffi-1.14.5-py3.8-win32.egg\cffi\setuptools_ext.py", line 219, in cffi_modules
    add_cffi_module(dist, cffi_module)
  File "c:\users\roosra\appdata\local\temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600\.eggs\cffi-1.14.5-py3.8-win32.egg\cffi\setuptools_ext.py", line 49, in add_cffi_module
    execfile(build_file_name, mod_vars)
  File "c:\users\roosra\appdata\local\temp\pip-install-pkvb0kar\ingenialink_c81e97608c284c76a5abdc7edfa24600\.eggs\cffi-1.14.5-py3.8-win32.egg\cffi\setuptools_ext.py", line 25, in execfile
    exec(code, glob, glob)
  File "ingenialink/ingenialink_build.py", line 195, in <module>
    _build_deps()
  File "ingenialink/ingenialink_build.py", line 80, in _build_deps
    check_call([cmake, '-H' + _SER_SRC, '-B' + _SER_BUILD,
  File "C:\Program Files (x86)\Python38-32\lib\subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Program Files\\CMake\\bin\\cmake.exe', '-H_deps\\ingenialink\\external\\sercomm', '-B_build\\sercomm', '-G', 'Visual Studio 14 2015', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX=_install', '-DBUILD_SHARED_LIBS=OFF', '-DWITH_PIC=ON']' returned non-zero exit status 1.
----------------------------------------

WARNING: Discarding https://files.pythonhosted.org/packages/50/b1/eb6ed477414e625602cc98e7452fc920d10b8ff95bca0380cd46f2b1b990/ingenialink-5.1.0.tar.gz#sha256=3b479b50c8713bf9f882745b46d17cbd650b02a203c5944d79758f04e625024e (from https://pypi.org/simple/ingenialink/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement ingenialink==5.1.0
ERROR: No matching distribution found for ingenialink==5.1.0

@oriolbv
Copy link
Collaborator

oriolbv commented Feb 26, 2021

I see in your log that you are using 32 bits Python. You must install a 64 bits version (https://www.python.org/downloads/release/python-368/).
Also, I recommend you not to change the installation path of your Python version.

@RobertoRoos
Copy link
Author

RobertoRoos commented Feb 26, 2021

Thank you for getting back to me.

I installed Python 3.8 (x64), but install still fails. Which Python versions are compatible?

Complete log again:

(venv) PS source> python -m pip install ingenialink
Collecting ingenialink
  Using cached ingenialink-5.1.0.tar.gz (31 kB)
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\RoosRA\Source\Symbitron\ingenialinkadvancedfeatures\venv\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\RoosRA\\AppData\\Local\\Temp\\pip-install-v5e3lvti\\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\\setup.py'"'"'; __file__='"'"'C:\\Users\\RoosRA\\AppData\\Local\\Temp\\pip-install-v5e3lvti\\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\RoosRA\AppData\Local\Temp\pip-pip-egg-info-935clonu'
         cwd: C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\
    Complete output (92 lines):
    WARNING: The wheel package is not available.
    WARNING: The wheel package is not available.
    Cloning into '_deps\ingenialink'...
    Note: switching to 'd83bde790eb430d5fdfbfb0e476507e68afda465'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by switching back to a branch.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -c with the switch command. Example:

      git switch -c <new-branch-name>

    Or undo this operation with:

      git switch -

    Turn off this advice by setting config variable advice.detachedHead to false

    Submodule 'external/libxml2/libxml2' (https://github.com/GNOME/libxml2.git) registered for path 'external/libxml2/libxml2'
    Submodule 'external/sercomm' (https://github.com/ingeniamc/sercomm.git) registered for path 'external/sercomm'
    Cloning into 'C:/Users/RoosRA/AppData/Local/Temp/pip-install-v5e3lvti/ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803/_deps/ingenialink/external/libxml2/libxml2'...
    Cloning into 'C:/Users/RoosRA/AppData/Local/Temp/pip-install-v5e3lvti/ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803/_deps/ingenialink/external/sercomm'...
    Submodule path 'external/libxml2/libxml2': checked out 'bc5a5d658320c37e206fe4e7b525b4a24466d0c6'
    Submodule path 'external/sercomm': checked out 'dd1f999884ec4202c6b42d623efdc5eabf1753fe'
    Submodule 'docs/template' (https://github.com/ingeniamc/doxygen-template.git) registered for path 'external/sercomm/docs/template'
    Cloning into 'C:/Users/RoosRA/AppData/Local/Temp/pip-install-v5e3lvti/ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803/_deps/ingenialink/external/sercomm/docs/template'...
    Submodule path 'external/sercomm/docs/template': checked out '9b4d271575c1a0393f1f53fbfc0e4ea1096f58e3'
    -- Selecting Windows SDK version  to target Windows 10.0.19041.
    CMake Error at CMakeLists.txt:30 (project):
      Failed to run MSBuild command:

        C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

      to get the value of VCTargetsPath:

        Microsoft (R) Build Engine version 14.0.23107.0
        Copyright (C) Microsoft Corporation. All rights reserved.

        Build started 26/02/2021 11:20:05.
        Project "C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj" on node 1 (default targets).
        C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install v140 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj]
        Done Building Project "C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj" (default targets) -- FAILED.

        Build FAILED.

        "C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj" (default target) (1) ->
        (PlatformPrepareForBuild target) ->
          C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install v140 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj]

            0 Warning(s)
            1 Error(s)

        Time Elapsed 00:00:00.69


      Exit code: 1



    -- Configuring incomplete, errors occurred!
    See also "C:/Users/RoosRA/AppData/Local/Temp/pip-install-v5e3lvti/ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803/_build/sercomm/CMakeFiles/CMakeOutput.log".
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\setup.py", line 9, in <module>
        setup(name='ingenialink',
      File "C:\Users\RoosRA\Source\Symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\__init__.py", line 165, in setup
        return distutils.core.setup(**attrs)
      File "C:\Program Files\Python38\lib\distutils\core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "C:\Users\RoosRA\Source\Symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\dist.py", line 429, in __init__
        _Distribution.__init__(self, {
      File "C:\Program Files\Python38\lib\distutils\dist.py", line 292, in __init__
        self.finalize_options()
      File "C:\Users\RoosRA\Source\Symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\dist.py", line 721, in finalize_options
        ep(self)
      File "C:\Users\RoosRA\Source\Symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\dist.py", line 728, in _finalize_setup_keywords
        ep.load()(self, ep.name, value)
      File "c:\users\roosra\appdata\local\temp\pip-install-v5e3lvti\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\.eggs\cffi-1.14.5-py3.8-win-amd64.egg\cffi\setuptools_ext.py", line 219, in cffi_modules
        add_cffi_module(dist, cffi_module)
      File "c:\users\roosra\appdata\local\temp\pip-install-v5e3lvti\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\.eggs\cffi-1.14.5-py3.8-win-amd64.egg\cffi\setuptools_ext.py", line 49, in add_cffi_module
        execfile(build_file_name, mod_vars)
      File "c:\users\roosra\appdata\local\temp\pip-install-v5e3lvti\ingenialink_c18b743a4ba54c8b9d89f27cf8c5a803\.eggs\cffi-1.14.5-py3.8-win-amd64.egg\cffi\setuptools_ext.py", line 25, in execfile
        exec(code, glob, glob)
      File "ingenialink/ingenialink_build.py", line 195, in <module>
        _build_deps()
      File "ingenialink/ingenialink_build.py", line 80, in _build_deps
        check_call([cmake, '-H' + _SER_SRC, '-B' + _SER_BUILD,
      File "C:\Program Files\Python38\lib\subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['C:\\Program Files\\CMake\\bin\\cmake.exe', '-H_deps\\ingenialink\\external\\sercomm', '-B_build\\sercomm', '-G', 'Visual Studio 14 2015 Win64', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX=_install', '-DBUILD_SHARED_LIBS=OFF', '-DWITH_PIC=ON']' returned non-zero exit status 1.
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/50/b1/eb6ed477414e625602cc98e7452fc920d10b8ff95bca0380cd46f2b1b990/ingenialink-5.1.0.tar.gz#sha256=3b479b50c8713bf9f882745b46d17cbd650b02a203c5944d79758f04e625024e (from https://pypi.org/simple/ingenialink/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached ingenialink-4.1.0.tar.gz (15 kB)
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\RoosRA\Source\Symbitron\ingenialinkadvancedfeatures\venv\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\RoosRA\\AppData\\Local\\Temp\\pip-install-v5e3lvti\\ingenialink_7333ad0383774b4a9f3b3100122f0583\\setup.py'"'"'; __file__='"'"'C:\\Users\\RoosRA\\AppData\\Local\\Temp\\pip-install-v5e3lvti\\ingenialink_7333ad0383774b4a9f3b3100122f0583\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\RoosRA\AppData\Local\Temp\pip-pip-egg-info-jo5t2fpi'
         cwd: C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_7333ad0383774b4a9f3b3100122f0583\
    Complete output (92 lines):
    WARNING: The wheel package is not available.
    WARNING: The wheel package is not available.
    Cloning into '_deps\ingenialink'...
    Note: switching to 'cf116cab28309f861e23a06bea5311a1132338c4'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by switching back to a branch.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -c with the switch command. Example:

      git switch -c <new-branch-name>

    Or undo this operation with:

      git switch -

    Turn off this advice by setting config variable advice.detachedHead to false

    Submodule 'external/libxml2/libxml2' (https://github.com/GNOME/libxml2.git) registered for path 'external/libxml2/libxml2'
    Submodule 'external/sercomm' (https://github.com/ingeniamc/sercomm.git) registered for path 'external/sercomm'
    Cloning into 'C:/Users/RoosRA/AppData/Local/Temp/pip-install-v5e3lvti/ingenialink_7333ad0383774b4a9f3b3100122f0583/_deps/ingenialink/external/libxml2/libxml2'...
    Cloning into 'C:/Users/RoosRA/AppData/Local/Temp/pip-install-v5e3lvti/ingenialink_7333ad0383774b4a9f3b3100122f0583/_deps/ingenialink/external/sercomm'...
    Submodule path 'external/libxml2/libxml2': checked out 'bc5a5d658320c37e206fe4e7b525b4a24466d0c6'
    Submodule path 'external/sercomm': checked out 'dd1f999884ec4202c6b42d623efdc5eabf1753fe'
    Submodule 'docs/template' (https://github.com/ingeniamc/doxygen-template.git) registered for path 'external/sercomm/docs/template'
    Cloning into 'C:/Users/RoosRA/AppData/Local/Temp/pip-install-v5e3lvti/ingenialink_7333ad0383774b4a9f3b3100122f0583/_deps/ingenialink/external/sercomm/docs/template'...
    Submodule path 'external/sercomm/docs/template': checked out '9b4d271575c1a0393f1f53fbfc0e4ea1096f58e3'
    -- Selecting Windows SDK version  to target Windows 10.0.19041.
    CMake Error at CMakeLists.txt:30 (project):
      Failed to run MSBuild command:

        C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

      to get the value of VCTargetsPath:

        Microsoft (R) Build Engine version 14.0.23107.0
        Copyright (C) Microsoft Corporation. All rights reserved.

        Build started 26/02/2021 11:20:28.
        Project "C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_7333ad0383774b4a9f3b3100122f0583\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj" on node 1 (default targets).
        C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install v140 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_7333ad0383774b4a9f3b3100122f0583\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj]
        Done Building Project "C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_7333ad0383774b4a9f3b3100122f0583\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj" (default targets) -- FAILED.

        Build FAILED.

        "C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_7333ad0383774b4a9f3b3100122f0583\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj" (default target) (1) ->
        (PlatformPrepareForBuild target) ->
          C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install v140 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_7333ad0383774b4a9f3b3100122f0583\_build\sercomm\CMakeFiles\3.19.1\VCTargetsPath.vcxproj]

            0 Warning(s)
            1 Error(s)

        Time Elapsed 00:00:00.09


      Exit code: 1



    -- Configuring incomplete, errors occurred!
    See also "C:/Users/RoosRA/AppData/Local/Temp/pip-install-v5e3lvti/ingenialink_7333ad0383774b4a9f3b3100122f0583/_build/sercomm/CMakeFiles/CMakeOutput.log".
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\RoosRA\AppData\Local\Temp\pip-install-v5e3lvti\ingenialink_7333ad0383774b4a9f3b3100122f0583\setup.py", line 9, in <module>
        setup(name='ingenialink',
      File "C:\Users\RoosRA\Source\Symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\__init__.py", line 165, in setup
        return distutils.core.setup(**attrs)
      File "C:\Program Files\Python38\lib\distutils\core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "C:\Users\RoosRA\Source\Symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\dist.py", line 429, in __init__
        _Distribution.__init__(self, {
      File "C:\Program Files\Python38\lib\distutils\dist.py", line 292, in __init__
        self.finalize_options()
      File "C:\Users\RoosRA\Source\Symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\dist.py", line 721, in finalize_options
        ep(self)
      File "C:\Users\RoosRA\Source\Symbitron\ingenialinkadvancedfeatures\venv\lib\site-packages\setuptools\dist.py", line 728, in _finalize_setup_keywords
        ep.load()(self, ep.name, value)
      File "c:\users\roosra\appdata\local\temp\pip-install-v5e3lvti\ingenialink_7333ad0383774b4a9f3b3100122f0583\.eggs\cffi-1.14.5-py3.8-win-amd64.egg\cffi\setuptools_ext.py", line 219, in cffi_modules
        add_cffi_module(dist, cffi_module)
      File "c:\users\roosra\appdata\local\temp\pip-install-v5e3lvti\ingenialink_7333ad0383774b4a9f3b3100122f0583\.eggs\cffi-1.14.5-py3.8-win-amd64.egg\cffi\setuptools_ext.py", line 49, in add_cffi_module
        execfile(build_file_name, mod_vars)
      File "c:\users\roosra\appdata\local\temp\pip-install-v5e3lvti\ingenialink_7333ad0383774b4a9f3b3100122f0583\.eggs\cffi-1.14.5-py3.8-win-amd64.egg\cffi\setuptools_ext.py", line 25, in execfile
        exec(code, glob, glob)
      File "ingenialink/ingenialink_build.py", line 174, in <module>
        _build_deps()
      File "ingenialink/ingenialink_build.py", line 72, in _build_deps
        check_call([cmake, '-H' + _SER_SRC, '-B' + _SER_BUILD,
      File "C:\Program Files\Python38\lib\subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['C:\\Program Files\\CMake\\bin\\cmake.exe', '-H_deps\\ingenialink\\external\\sercomm', '-B_build\\sercomm', '-G', 'Visual Studio 14 2015 Win64', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX=_install', '-DBUILD_SHARED_LIBS=OFF', '-DWITH_PIC=ON']' returned non-zero exit status 1.
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/ba/2d/ec8b830f77ce9f48a261a07c9be192e5304844b7508df60908bfd2731819/ingenialink-4.1.0.tar.gz#sha256=e45b5f0bbed81568a6f56e373d0b4b3452915c9e3fdca1a59aac2d6f70edc90a (from https://pypi.org/simple/ingenialink/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached ingenialink-4.0.0.tar.gz (14 kB)
ERROR: Operation cancelled by user

@oriolbv
Copy link
Collaborator

oriolbv commented Feb 26, 2021

Can you try with the 3.6.x?? (https://www.python.org/downloads/release/python-368/).

@RobertoRoos
Copy link
Author

Also installed Python 3.6.8 (x64), and there ingenialink installs.
(Note, later Python 3.6 builds for Windows don't have an installer anymore.)

So there are no newer binary wheels available? Considering Python 3.6.8 is from December 2018 it seems reasonable to support Python 3.8.

@oriolbv
Copy link
Collaborator

oriolbv commented Feb 26, 2021

Okey, then the problem is not coming from the Python version at all. As you may know, ingenialink-python is a wrapper from a C library called ingenialink.
In order to install the libraries from source code, you will need to compile the dependency code in C. To do that, you need the VC toolchain (vc140) that comes with Visual Studio 2015 and CMake installed.

That should fix your problems.

@RobertoRoos
Copy link
Author

I don't understand your comment.

I am quite certain that with the install from Python 3.6 (x64) no compilation is done. Instead, a precompiled (-ish) binary wheel (*.whl) file is downloaded from pypi.org.

The reason the installation succeeds for Python 3.6 and fails for 3.8 is pypi.org does not have a suitable binary for that version.

Attached is the verbose log of pip install ingenialink -v. There is no compilation.

If I try to install on Python 3.6 while explicitly skipping the binaries, the install fails again with the same familiar error:

(venv36) PS C:\Users\RoosRA\Source\Symbitron\ingenialinkadvancedfeatures> pip install ingenialink --no-binary :all:
Collecting ingenialink
  Using cached ingenialink-5.1.0.tar.gz (31 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\roosra\source\symbitron\ingenialinkadvancedfeatures\venv36\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\RoosRA\\AppData\\Local\\Temp\\pip-install-_es9ufsg\\ingenialink_a6dee6a5d005449c853deb751f994f81\\setup.py'"'"'; __file__='"'"'C:\\Users\\RoosRA\\AppData\\Local\\Temp\\pip-install-_es9ufsg\\ingenialink_a6dee6a5d005449c853deb751f994f81\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\RoosRA\AppData\Local\Temp\pip-pip-egg-info-bdfjmd2k'
         cwd: C:\Users\RoosRA\AppData\Local\Temp\pip-install-_es9ufsg\ingenialink_a6dee6a5d005449c853deb751f994f81\

    ...

    subprocess.CalledProcessError: Command '['C:\\Program Files\\CMake\\bin\\cmake.exe', '-H_deps\\ingenialink\\external\\sercomm', '-B_build\\sercomm', '-G', 'Visual Studio 14 2015 Win64', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX=_install', '-DBUILD_SHARED_LIBS=OFF', '-DWITH_PIC=ON']' returned non-zero exit status 1.
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/50/b1/eb6ed477414e625602cc98e7452fc920d10b8ff95bca0380cd46f2b1b990/ingenialink-5.1.0.tar.gz#sha256=3b479b50c8713bf9f882745b46d17cbd650b02a203c5944d79758f04e625024e (from https://pypi.org/simple/ingenialink/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached ingenialink-4.1.0.tar.gz (15 kB)
ERROR: Operation cancelled by user

So, hence my request. You've already uploaded binaries for Python 3.6 (x64), let's then also make binaries for later versions.

@RobertoRoos
Copy link
Author

RobertoRoos commented Mar 9, 2021

I've finally managed to build it myself. I needed to install the platform toolset v140 specifically, and it only works for x64 Python editions.

Attached is a .whl for anyone who wants it: ingenialink-5.1.0-cp38-cp38-win_amd64.zip

In the meantime, are you considering updating the wheels on PyPi.org?

@rjuanpere rjuanpere assigned GullinBustin and unassigned oriolbv Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants