Я немного новичок в python и использую pip для установки пакетов через консоль. Работал хорошо с предыдущими установками, но когда я пытаюсь установить pyzmq, я получаю сообщение об ошибке. Я думал, что проблема была передана Cython (поскольку я раньше видел нечто подобное), но затем я установил Cython, и проблема сохраняется. Вот полное сообщение, которое я получаю:
Collecting pyzmq
Using cached https://files.pythonhosted.org/packages/7a/d2/1eb3a994374802b352d4911f3317313a5b4ea786bc830cc5e343dad9b06d/pyzmq-18.1.0.tar.gz
Building wheels for collected packages: pyzmq
Building wheel for pyzmq (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\gianf\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gianf\\AppData\\Local\\Temp\\pip-install-7scmlplo\\pyzmq\\setup.py'"'"'; __file__='"'"'C:\\Users\\gianf\\AppData\\Local\\Temp\\pip-install-7scmlplo\\pyzmq\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\gianf\AppData\Local\Temp\pip-wheel-hxgsq9q7' --python-tag cp38
cwd: C:\Users\gianf\AppData\Local\Temp\pip-install-7scmlplo\pyzmq\
Complete output (191 lines):
running bdist_wheel
running build
running build_py
Generating grammar tables from C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\lib\lib2to3\Grammar.txt
Writing grammar tables to C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\lib\lib2to3\Grammar3.8.0.final.0.pickle
Writing failed: [Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\\lib\\lib2to3\\Grammar3.8.0.final.0.pickle'
Generating grammar tables from C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\lib\lib2to3\PatternGrammar.txt
Writing grammar tables to C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\lib\lib2to3\PatternGrammar3.8.0.final.0.pickle
Writing failed: [Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\\lib\\lib2to3\\PatternGrammar3.8.0.final.0.pickle'
creating build
(((copying / creating a bunch of stuff I omitted to fit on the post)))
copying zmq\utils\zmq_constants.h -> build\lib.win-amd64-3.8\zmq\utils
running build_ext
running configure
{'libraries': ['libzmq'], 'include_dirs': [], 'library_dirs': [], 'runtime_library_dirs': [], 'extra_link_args': []}
Warning: Couldn't find an acceptable libzmq on the system.
If you expected pyzmq to link against an installed libzmq, please check to make sure:
* You have a C compiler installed
* A development version of Python is installed (including headers)
* A development version of ZMQ >= 3.2 is installed (including headers)
* If ZMQ is not in a default location, supply the argument --zmq=<path>
* If you did recently install ZMQ to a default location,
try rebuilding the ld cache with `sudo ldconfig`
or specify zmq's location with `--zmq=/usr/local`
You can skip all this detection/waiting nonsense if you know
you want pyzmq to bundle libzmq as an extension by passing:
`--zmq=bundled`
I will now try to build libzmq as a Python extension
unless you interrupt me (^C) in the next 10 seconds...
************************************************
1...
Using bundled libzmq
already have bundled\zeromq
staging platform.hpp from: C:\Users\gianf\AppData\Local\Temp\pip-install-7scmlplo\pyzmq\buildutils\include_win32
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
************************************************
----------------------------------------
ERROR: Failed building wheel for pyzmq
Running setup.py clean for pyzmq
Failed to build pyzmq
Installing collected packages: pyzmq
Running setup.py install for pyzmq ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\gianf\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gianf\\AppData\\Local\\Temp\\pip-install-7scmlplo\\pyzmq\\setup.py'"'"'; __file__='"'"'C:\\Users\\gianf\\AppData\\Local\\Temp\\pip-install-7scmlplo\\pyzmq\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\gianf\AppData\Local\Temp\pip-record-7kjkoe_6\install-record.txt' --single-version-externally-managed --compile --user --prefix=
cwd: C:\Users\gianf\AppData\Local\Temp\pip-install-7scmlplo\pyzmq\
Complete output (193 lines):
running install
running build
running build_py
Generating grammar tables from C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\lib\lib2to3\Grammar.txt
Writing grammar tables to C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\lib\lib2to3\Grammar3.8.0.final.0.pickle
Writing failed: [Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\\lib\\lib2to3\\Grammar3.8.0.final.0.pickle'
Generating grammar tables from C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\lib\lib2to3\PatternGrammar.txt
Writing grammar tables to C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\lib\lib2to3\PatternGrammar3.8.0.final.0.pickle
Writing failed: [Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\\lib\\lib2to3\\PatternGrammar3.8.0.final.0.pickle'
(((copying / creating a bunch of lines I omitted to fit on the post)))
running build_ext
running configure
{'libraries': ['libzmq'], 'include_dirs': [], 'library_dirs': [], 'runtime_library_dirs': [], 'extra_link_args': []}
Warning: Couldn't find an acceptable libzmq on the system.
If you expected pyzmq to link against an installed libzmq, please check to make sure:
* You have a C compiler installed
* A development version of Python is installed (including headers)
* A development version of ZMQ >= 3.2 is installed (including headers)
* If ZMQ is not in a default location, supply the argument --zmq=<path>
* If you did recently install ZMQ to a default location,
try rebuilding the ld cache with `sudo ldconfig`
or specify zmq's location with `--zmq=/usr/local`
You can skip all this detection/waiting nonsense if you know
you want pyzmq to bundle libzmq as an extension by passing:
`--zmq=bundled`
I will now try to build libzmq as a Python extension
unless you interrupt me (^C) in the next 10 seconds...
1...
Using bundled libzmq
already have bundled\zeromq
already have platform.hpp
building 'zmq.libzmq' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\gianf\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gianf\\AppData\\Local\\Temp\\pip-install-7scmlplo\\pyzmq\\setup.py'"'"'; __file__='"'"'C:\\Users\\gianf\\AppData\\Local\\Temp\\pip-install-7scmlplo\\pyzmq\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\gianf\AppData\Local\Temp\pip-record-7kjkoe_6\install-record.txt' --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.
Поскольку я заметил ошибку в MS C ++, я скачал и установил практически все, что мог, связанный с Microsoft visual C ++, но ошибка сохраняется.
Также пытался установить pyzmq через файл msi, но я не уверен в правильности пути.