所以,我知道这个问题在这里被问了很多次,但是我执行了pip install python-pkcs11,pip抛出了这个错误
错误:需要MicrosoftVisualC++ 14.0或更高版本。使用"Microsoft C++构建工具“获得它:https://visualstudio.microsoft.com/visual-cpp-build-tools/
尽管我已经尝试过这里、这里、这里和这里中的几乎每一个解决方案,但我仍然困在这个问题上。老实说,我很绝望,因为这些都没有用,我也不知道该怎么办了。所以,如果有人能帮我,我会非常感激。
以下是完整的错误点安装日志:
> 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.发布于 2022-05-29 01:15:03
您可以从github安装完整的软件包。
https://stackoverflow.com/questions/72420280
复制相似问题