K
K
Kakeru2021-10-11 05:14:34
pip
Kakeru, 2021-10-11 05:14:34

PyNaCl installation error, how to fix?

Required to run a bot for Discord.

When installing with the pip install command, PyNaCl (or pynacl) gives the following error:

ERROR
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: cffi, pynacl
Running setup.py install for cffi ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\atori\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\atori\\AppData\\Local\\Temp\\pip-install-45fv_4xx\\cffi_03d9573627594050a51a50aa41b328be\\setup.py'"'"'; __file__='"'"'C:\\Users\\atori\\AppData\\Local\\Temp\\pip-install-45fv_4xx\\cffi_03d9573627594050a51a50aa41b328be\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\atori\AppData\Local\Temp\pip-record-oyawpw6c\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\atori\AppData\Local\Programs\Python\Python310\Include\cffi'
cwd: C:\Users\atori\AppData\Local\Temp\pip-install-45fv_4xx\cffi_03d9573627594050a51a50aa41b328be\
Complete output (26 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\cffi
copying cffi\api.py -> build\lib.win-amd64-3.10\cffi
copying cffi\backend_ctypes.py -> build\lib.win-amd64-3.10\cffi
copying cffi\cffi_opcode.py -> build\lib.win-amd64-3.10\cffi
copying cffi\commontypes.py -> build\lib.win-amd64-3.10\cffi
copying cffi\cparser.py -> build\lib.win-amd64-3.10\cffi
copying cffi\ffiplatform.py -> build\lib.win-amd64-3.10\cffi
copying cffi\lock.py -> build\lib.win-amd64-3.10\cffi
copying cffi\model.py -> build\lib.win-amd64-3.10\cffi
copying cffi\recompiler.py -> build\lib.win-amd64-3.10\cffi
copying cffi\setuptools_ext.py -> build\lib.win-amd64-3.10\cffi
copying cffi\vengine_cpy.py -> build\lib.win-amd64-3.10\cffi
copying cffi\vengine_gen.py -> build\lib.win-amd64-3.10\cffi
copying cffi\verifier.py -> build\lib.win-amd64-3.10\cffi
copying cffi\__init__.py -> build\lib.win-amd64-3.10\cffi
copying cffi\_cffi_include.h -> build\lib.win-amd64-3.10\cffi
copying cffi\parse_c_type.h -> build\lib.win-amd64-3.10\cffi
copying cffi\_embedding.h -> build\lib.win-amd64-3.10\cffi
running build_ext
building '_cffi_backend' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-buil...
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\atori\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\atori\\AppData\\Local\\Temp\\pip-install-45fv_4xx\\cffi_03d9573627594050a51a50aa41b328be\\setup.py'"'"'; __file__='"'"'C:\\Users\\atori\\AppData\\Local\\Temp\\pip-install-45fv_4xx\\cffi_03d9573627594050a51a50aa41b328be\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\atori\AppData\Local\Temp\pip-record-oyawpw6c\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\atori\AppData\Local\Programs\Python\Python310\Include\cffi' Check the logs for full command output.

tried to install via whl file, same error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Nesterov, 2021-10-11
@kakeru

Did you even read the error yourself?

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question