awslabs / aws-greengrass-labs-certificate-rotator

Greengrass component and companion cloud backend for rotating the core device certificate and private key
Apache License 2.0
11 stars 2 forks source link

facing the error while installing the 'requirements.txt' #57

Open pmamkh opened 2 weeks ago

pmamkh commented 2 weeks ago

Hi,

I am getting the error while installing the 'requirements.txt'. It is related to python-pkcs11 packages.

I am running all the command in VS Code.

Error is as below:

Failed to build python-pkcs11 ERROR: Could not build wheels for python-pkcs11, which is required to install pyproject.toml-based projects

I tried all the way to resolve this issue but unfortunately no any succes.

gregbreen commented 2 weeks ago

Hi. Could you please give the full output so I can see the root cause? Also, what operating system and version are you using?

pmamkh commented 2 weeks ago

Hello,

I am using the windows 11 and running the commands in VS Code. **Below is the error output while run the ip3 install -r requirements.txt command.**

Building wheel for python-pkcs11 (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [360 lines of output] C:\aws-greengrass-labs-certificate-rotator-main\aws-greengrass-labs-certificate-rotator-main\venv\Lib\site-packages\setuptools__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************

WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section' Traceback (most recent call last): File "c:\appdata\local\temp\pip-install-smk5rckl\python-pkcs11_93cac7e5ca3845b99ea486377a9d5835.eggs\setuptools_scm-8.1.0-py3.11.egg\setuptools_scm_integration\pyproject_reading.py", line 36, in read_pyproject section = defn.get("tool", {})[tool_name]


      KeyError: 'setuptools_scm'
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\pkcs11
      copying pkcs11\constants.py -> build\lib.win-amd64-cpython-311\pkcs11
      copying pkcs11\defaults.py -> build\lib.win-amd64-cpython-311\pkcs11
      copying pkcs11\exceptions.py -> build\lib.win-amd64-cpython-311\pkcs11
      copying pkcs11\mechanisms.py -> build\lib.win-amd64-cpython-311\pkcs11
      copying pkcs11\types.py -> build\lib.win-amd64-cpython-311\pkcs11
      copying pkcs11\__init__.py -> build\lib.win-amd64-cpython-311\pkcs11
      creating build\lib.win-amd64-cpython-311\pkcs11\util
      copying pkcs11\util\dh.py -> build\lib.win-amd64-cpython-311\pkcs11\util
      copying pkcs11\util\dsa.py -> build\lib.win-amd64-cpython-311\pkcs11\util
      copying pkcs11\util\ec.py -> build\lib.win-amd64-cpython-311\pkcs11\util
      copying pkcs11\util\rsa.py -> build\lib.win-amd64-cpython-311\pkcs11\util
      copying pkcs11\util\x509.py -> build\lib.win-amd64-cpython-311\pkcs11\util
      copying pkcs11\util\__init__.py -> build\lib.win-amd64-cpython-311\pkcs11\util
      running egg_info
      writing python_pkcs11.egg-info\PKG-INFO
      writing dependency_links to python_pkcs11.egg-info\dependency_links.txt
      writing requirements to python_pkcs11.egg-info\requires.txt
      writing top-level names to python_pkcs11.egg-info\top_level.txt
      ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
      reading manifest file 'python_pkcs11.egg-info\SOURCES.txt'
      writing manifest file 'python_pkcs11.egg-info\SOURCES.txt'
      copying pkcs11\_errors.pyx -> build\lib.win-amd64-cpython-311\pkcs11
      copying pkcs11\_mswin.pxd -> build\lib.win-amd64-cpython-311\pkcs11
      copying pkcs11\_pkcs11.pyx -> build\lib.win-amd64-cpython-311\pkcs11
      copying pkcs11\_pkcs11_defn.pxd -> build\lib.win-amd64-cpython-311\pkcs11
      copying pkcs11\_utils.pyx -> build\lib.win-amd64-cpython-311\pkcs11
      running build_ext
      Compiling pkcs11/_pkcs11.pyx because it changed.
      [1/1] Cythonizing pkcs11/_pkcs11.pyx
      warning: pkcs11\_pkcs11.pyx:17:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
      warning: pkcs11\_errors.pyx:85:44: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
      warning: pkcs11\_pkcs11.pyx:1366:4: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
      warning: pkcs11\_pkcs11.pyx:1390:8: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
      warning: pkcs11\_pkcs11.pyx:1421:8: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
      performance hint: pkcs11\_errors.pyx:85:6: Exception check on 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:1391:46: Py_UNICODE* has been removed in Python 3.12. This conversion to a Py_UNICODE* will no longer compile in the latest Python versions. Use Python C API functions like PyUnicode_AsWideCharString if you need to obtain a wchar_t* on Windows (and free the string manually after use).
      performance hint: pkcs11\_pkcs11.pyx:196:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:211:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:219:70: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:219:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:230:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:268:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:274:28: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:282:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:303:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:316:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:336:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:363:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:366:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:380:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:427:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:488:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:566:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:582:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:590:63: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:590:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:606:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:609:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:616:51: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:615:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:633:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:640:32: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:646:32: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:651:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:656:64: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:656:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:720:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:731:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:747:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:759:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:769:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:855:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:892:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:896:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:903:56: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:902:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:935:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:947:74: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:946:28: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:957:67: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:957:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:983:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:987:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:994:55: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:993:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1026:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:1038:74: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:1037:28: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:1048:67: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:1048:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1074:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1077:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:1084:52: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:1083:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1105:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1115:28: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1120:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:1125:65: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:1125:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1150:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1152:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1172:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1182:28: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1186:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1210:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:1217:59: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:1216:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1276:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1338:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1409:38: Exception check after calling 'C_GetFunctionList' will always require the GIL to be acquired. Declare 'C_GetFunctionList' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
      performance hint: pkcs11\_pkcs11.pyx:1409:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1432:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1439:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1470:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      warning: pkcs11\_pkcs11.pyx:1478:64: Use boundscheck(False) for faster access
      performance hint: pkcs11\_pkcs11.pyx:1478:20: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1487:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1556:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1557:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      performance hint: pkcs11\_pkcs11.pyx:1562:24: Exception check after calling 'assertRV' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare 'assertRV' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on 'assertRV' to allow an error code to be returned.
      building 'pkcs11._pkcs11' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\pkcs11
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\aws-greengrass-labs-certificate-rotator-main\aws-greengrass-labs-certificate-rotator-main\venv\include "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\include" "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" -IC:\openssl-3.3.0\openssl-3.3.0 /Tcpkcs11/_pkcs11.c /Fobuild\temp.win-amd64-cpython-311\Release\pkcs11/_pkcs11.obj
      _pkcs11.c
      C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.40.33807\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-pkcs11
  Running setup.py clean for python-pkcs11
Failed to build python-pkcs11
ERROR: Could not build wheels for python-pkcs11, which is required to install pyproject.toml-based projects
gregbreen commented 2 weeks ago

Thanks @pmamkh . This is a problem with python-pkcs11 0.7.0 itself: https://github.com/pyauth/python-pkcs11/issues/159. There is no newer version available. Consequently, there is not really anything that can be done in this certificate rotator project. Apart from perhaps adding a note to the README recommending Python 3.9 if your developer machine is Windows.

Greengrass itself doesn't support HSMs on Windows devices. The only reason to install python-pkcs11 on a Windows box is if you want to fork and develop this project on a Windows host machine, but deploy the component to Linux devices. Your best workaround option would be to use Python 3.9 on your Windows machine.

pmamkh commented 1 week ago

Thanks @gregbreen for the information. I have published this certificate rotator component to one of dev account. I am trying to deploy it in one of edge device which i have.

so my first query is, as you have mentioned earlier i should install python 3.9 but where should i install it in edge device or in virtual enviornment? As i have checked the aws.greengrass.labs.CertificateRotator.yaml file, component itself activate the venv and install the dependent packages.

Second query is, Component deployment gets fail when i deploy it to edge device. I am getting below error while deploy the component. Below is the content of component log file which generates in edge device (greengrass/v2/logs directory).

2024-06-26T08:38:02.018Z [INFO] (pool-2-thread-41) aws.greengrass.labs.CertificateRotator: shell-runner-start. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW, command=["echo Creating virtual environment\npython3 -m venv venv\necho Activating virtual..."]} 2024-06-26T08:38:02.039Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Creating virtual environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:04.548Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Activating virtual environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:04.548Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Upgrading pip. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:05.675Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Requirement already satisfied: pip in ./venv/lib/python3.6/site-packages (21.3.1). {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:06.645Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Installing package requirements. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:07.659Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Ignoring python-pkcs11: markers 'platform_system == "Linux" and python_version >= "3.7"' don't match your environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:07.659Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Ignoring wheel: markers 'platform_system == "Linux" and python_version >= "3.7"' don't match your environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:08.210Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Collecting asn1crypto==1.5.1. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:08.218Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Using cached asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB). {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:08.692Z [WARN] (Copier) aws.greengrass.labs.CertificateRotator: stderr. ERROR: Could not find a version that satisfies the requirement awsiotsdk==1.21.0 (from versions: 0.2.4, 0.2.9, 0.3.0, 1.0.2, 1.0.3, 1.0.5, 1.0.6, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.10, 1.5.11, 1.5.12, 1.5.13, 1.5.14, 1.5.15, 1.5.16, 1.5.17, 1.5.18, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.8.0, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0, 1.10.3, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.11.5, 1.11.6, 1.11.7, 1.11.8, 1.11.9). {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:08.692Z [WARN] (Copier) aws.greengrass.labs.CertificateRotator: stderr. ERROR: No matching distribution found for awsiotsdk==1.21.0. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:08.845Z [WARN] (pool-2-thread-41) aws.greengrass.labs.CertificateRotator: shell-runner-error. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW, command=["echo Creating virtual environment\npython3 -m venv venv\necho Activating virtual..."]} 2024-06-26T08:38:08.969Z [INFO] (pool-2-thread-41) aws.greengrass.labs.CertificateRotator: shell-runner-start. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW, command=["echo Creating virtual environment\npython3 -m venv venv\necho Activating virtual..."]} 2024-06-26T08:38:08.982Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Creating virtual environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:11.467Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Activating virtual environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:11.467Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Upgrading pip. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:12.469Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Requirement already satisfied: pip in ./venv/lib/python3.6/site-packages (21.3.1). {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:13.408Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Installing package requirements. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:14.422Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Ignoring python-pkcs11: markers 'platform_system == "Linux" and python_version >= "3.7"' don't match your environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:14.423Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Ignoring wheel: markers 'platform_system == "Linux" and python_version >= "3.7"' don't match your environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:14.969Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Collecting asn1crypto==1.5.1. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:14.976Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Using cached asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB). {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:15.248Z [WARN] (Copier) aws.greengrass.labs.CertificateRotator: stderr. ERROR: Could not find a version that satisfies the requirement awsiotsdk==1.21.0 (from versions: 0.2.4, 0.2.9, 0.3.0, 1.0.2, 1.0.3, 1.0.5, 1.0.6, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.10, 1.5.11, 1.5.12, 1.5.13, 1.5.14, 1.5.15, 1.5.16, 1.5.17, 1.5.18, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.8.0, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0, 1.10.3, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.11.5, 1.11.6, 1.11.7, 1.11.8, 1.11.9). {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:15.248Z [WARN] (Copier) aws.greengrass.labs.CertificateRotator: stderr. ERROR: No matching distribution found for awsiotsdk==1.21.0. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:15.401Z [WARN] (pool-2-thread-41) aws.greengrass.labs.CertificateRotator: shell-runner-error. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW, command=["echo Creating virtual environment\npython3 -m venv venv\necho Activating virtual..."]} 2024-06-26T08:38:15.518Z [INFO] (pool-2-thread-41) aws.greengrass.labs.CertificateRotator: shell-runner-start. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW, command=["echo Creating virtual environment\npython3 -m venv venv\necho Activating virtual..."]} 2024-06-26T08:38:15.531Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Creating virtual environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:18.048Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Activating virtual environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:18.049Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Upgrading pip. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:19.050Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Requirement already satisfied: pip in ./venv/lib/python3.6/site-packages (21.3.1). {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:19.955Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Installing package requirements. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:20.976Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Ignoring python-pkcs11: markers 'platform_system == "Linux" and python_version >= "3.7"' don't match your environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:20.977Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Ignoring wheel: markers 'platform_system == "Linux" and python_version >= "3.7"' don't match your environment. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:21.524Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Collecting asn1crypto==1.5.1. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:21.532Z [INFO] (Copier) aws.greengrass.labs.CertificateRotator: stdout. Using cached asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB). {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:22.210Z [WARN] (Copier) aws.greengrass.labs.CertificateRotator: stderr. ERROR: Could not find a version that satisfies the requirement awsiotsdk==1.21.0 (from versions: 0.2.4, 0.2.9, 0.3.0, 1.0.2, 1.0.3, 1.0.5, 1.0.6, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.10, 1.5.11, 1.5.12, 1.5.13, 1.5.14, 1.5.15, 1.5.16, 1.5.17, 1.5.18, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.8.0, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0, 1.10.3, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.11.5, 1.11.6, 1.11.7, 1.11.8, 1.11.9). {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:22.210Z [WARN] (Copier) aws.greengrass.labs.CertificateRotator: stderr. ERROR: No matching distribution found for awsiotsdk==1.21.0. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW} 2024-06-26T08:38:22.361Z [WARN] (pool-2-thread-41) aws.greengrass.labs.CertificateRotator: shell-runner-error. {scriptName=services.aws.greengrass.labs.CertificateRotator.lifecycle.Install.Script, serviceName=aws.greengrass.labs.CertificateRotator, currentState=NEW, command=["echo Creating virtual environment\npython3 -m venv venv\necho Activating virtual..."]}

gregbreen commented 4 days ago

Hi @pmamkh .

so my first query is, as you have mentioned earlier i should install python 3.9 but where should i install it in edge device or in virtual environment?

On your Windows machine that you're using for development. That's where you're getting the error when running pip install -r requirements.txt, if I understand correctly. When you run that command, it needs to be under Python 3.9. Currently you're using Python 3.11.

Second query is, Component deployment gets fail when i deploy it to edge device. I am getting below error while deploy the component. Below is the content of component log file which generates in edge device (greengrass/v2/logs directory).

What is your edge device and what version of Python does it have? I'm pretty sure that it's Python 3.6. The awsiotsdk dropped support for Python 3.6 in release 1.11.10: https://github.com/aws/aws-iot-device-sdk-python-v2/releases/tag/v1.11.10. Which I think is why the maximum version available to your device is 1.11.9. Per the readme, your device needs at least Python 3.8 to be able to install and run the certificate rotator component: https://github.com/awslabs/aws-greengrass-labs-certificate-rotator/tree/main?tab=readme-ov-file#python-requirements