So, I know this question is asked quite a lot in here, but I executed the pip install python-pkcs11
and pip threw this error
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
And even though I've tried almost every single solution in here, here, here and here, I am still stuck in this problem. Honestly, I am getting desperate because none of it worked and I don't know what to do anymore. So, if anyone can help me, I'd greatly appreciate.
Here's the complete error pip install log:
> PS C:\Users\AYRTO> pip install python-pkcs11 Collecting python-pkcs11
> Using cached python-pkcs11-0.7.0.tar.gz (106 kB) Preparing metadata
> (setup.py) ... done Requirement already satisfied: asn1crypto in
> c:\users\ayrto\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
> (from python-pkcs11) (1.5.1) Requirement already satisfied:
> cached-property in
> c:\users\ayrto\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
> (from python-pkcs11) (1.5.2) Building wheels for collected packages:
> python-pkcs11 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 ╰─> [52 lines of output]
> C:\Users\AYRTO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\setuptools\installer.py:27:
> SetuptoolsDeprecationWarning: setuptools.installer is deprecated.
> Requirements should be satisfied by a PEP 517 installer.
> warnings.warn(
> running bdist_wheel
> running build
> running build_py
> creating build
> creating build\lib.win-amd64-cpython-310
> creating build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\constants.py -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\defaults.py -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\exceptions.py -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\mechanisms.py -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\types.py -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\__init__.py -> build\lib.win-amd64-cpython-310\pkcs11
> creating build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\dh.py -> build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\dsa.py -> build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\ec.py -> build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\rsa.py -> build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\x509.py -> build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\__init__.py -> build\lib.win-amd64-cpython-310\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
> 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-310\pkcs11
> copying pkcs11\_mswin.pxd -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\_pkcs11.pyx -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\_pkcs11_defn.pxd -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\_utils.pyx -> build\lib.win-amd64-cpython-310\pkcs11
> running build_ext
> cythoning pkcs11/_pkcs11.pyx to pkcs11\_pkcs11.c
> warning: pkcs11\_pkcs11.pyx:219:70: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:590:63: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:616:51: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:656:64: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:903:56: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:947:74: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:957:67: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:994:55: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:1038:74: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:1048:67: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:1084:52: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:1125:65: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:1217:59: Use boundscheck(False) for faster access
> warning: pkcs11\_pkcs11.pyx:1478:64: Use boundscheck(False) for faster access
> building 'pkcs11._pkcs11' extension
> error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":
> https://visualstudio.microsoft.com/visual-cpp-build-tools/
> [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
> Installing collected packages: python-pkcs11 Running setup.py
> install for python-pkcs11 ... error error:
> subprocess-exited-with-error
>
> × Running setup.py install for python-pkcs11 did not run
> successfully. │ exit code: 1 ╰─> [40 lines of output]
> C:\Users\AYRTO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\setuptools\installer.py:27:
> SetuptoolsDeprecationWarning: setuptools.installer is deprecated.
> Requirements should be satisfied by a PEP 517 installer.
> warnings.warn(
> running install
> C:\Users\AYRTO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\setuptools\command\install.py:34:
> SetuptoolsDeprecationWarning: setup.py install is deprecated. Use
> build and pip and other standards-based tools.
> warnings.warn(
> running build
> running build_py
> creating build
> creating build\lib.win-amd64-cpython-310
> creating build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\constants.py -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\defaults.py -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\exceptions.py -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\mechanisms.py -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\types.py -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\__init__.py -> build\lib.win-amd64-cpython-310\pkcs11
> creating build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\dh.py -> build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\dsa.py -> build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\ec.py -> build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\rsa.py -> build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\x509.py -> build\lib.win-amd64-cpython-310\pkcs11\util
> copying pkcs11\util\__init__.py -> build\lib.win-amd64-cpython-310\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
> 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-310\pkcs11
> copying pkcs11\_mswin.pxd -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\_pkcs11.pyx -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\_pkcs11_defn.pxd -> build\lib.win-amd64-cpython-310\pkcs11
> copying pkcs11\_utils.pyx -> build\lib.win-amd64-cpython-310\pkcs11
> running build_ext
> skipping 'pkcs11\_pkcs11.c' Cython extension (up-to-date)
> building 'pkcs11._pkcs11' extension
> error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":
> https://visualstudio.microsoft.com/visual-cpp-build-tools/
> [end of output]
>
> note: This error originates from a subprocess, and is likely not a
> problem with pip. error: legacy-install-failure
>
> × Encountered error while trying to install package. ╰─> python-pkcs11
>
> note: This is an issue with the package mentioned above, not pip.
> hint: See above for output from the failure.