Closed richardwei6 closed 3 years ago
Just realized, here's a dead issue that was never answered but it's basically what I'm having an issue with: https://github.com/zeromq/pyzmq/issues/1235
--zmq=
arg should work with the following changes:1481 should greatly improve building and linking an external libzmq release, which I would recommend using for drafts builds. Can you try building with master? The same
--zmq=
arg should work with the following changes:
- it should correctly handle the layout of libzmq*.lib and zmq.h both in the same directory
- it will no longer try to bundle externally linked libzmq (that's up to you, either by putting it on %PATH% or postprocessing the resulting wheel with delvewheel).
Hello, thanks for letting me know. Unfortunately, the --zmq="[dir here]"
install option still gives me an error.
Here's the log output:
running configure
{'libraries': ['libzmq'], 'include_dirs': ['C:\\Users\\richa\\Desktop\\build\\include'], 'library_dirs': ['C:\\Users\\richa\\Desktop\\build\\lib'], 'runtime_library_dirs': [], 'extra_link_args': []}
Warning: Could not copy libzmq into zmq/, which is usually necessary on Windows.Please specify zmq prefix via configure --zmq=/path/to/zmq or copy libzmq into zmq/ manually.
Configure: Autodetecting ZMQ settings...
Custom ZMQ dir: C:\Users\richa\Desktop\build
************************************************
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\richa\Desktop\build\include -Izmq\utils -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tcbuild\temp.win-amd64-3.9\Release\scratch\vers.c /Fobuild\temp.win-amd64-3.9\Release\scratch\vers.obj
vers.c
build\temp.win-amd64-3.9\Release\scratch\vers.c(4): fatal error C1083: Cannot open include file: 'zmq.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
Fatal: Falling back on bundled libzmq, but config has explicitly prohibited building the libzmq extension.
Running setup.py install for pyzmq ... error
ERROR: Command errored out with exit status 1: 'C:\Users\richa\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\richa\\AppData\\Local\\Temp\\pip-install-qmkhnwd9\\pyzmq_5afe9ee30b9042048bb360b2e27343c1\\setup.py'"'"'; __file__='"'"'C:\\Users\\richa\\AppData\\Local\\Temp\\pip-install-qmkhnwd9\\pyzmq_5afe9ee30b9042048bb360b2e27343c1\\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\richa\AppData\Local\Temp\pip-record-_wdqkm79\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\pyzmq' --enable-drafts '--zmq=C:\Users\richa\Desktop\build' Check the logs for full command output.
Exception information:
Traceback (most recent call last):
File "C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_internal\req\req_install.py", line 812, in install
success = install_legacy(
File "C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_internal\operations\install\legacy.py", line 86, in install
raise LegacyInstallFailure
pip._internal.operations.install.legacy.LegacyInstallFailure
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_internal\cli\base_command.py", line 189, in _main
status = self.run(options, args)
File "C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_internal\cli\req_command.py", line 178, in wrapper
return func(self, options, args)
File "C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_internal\commands\install.py", line 391, in run
installed = install_given_reqs(
File "C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_internal\req\__init__.py", line 80, in install_given_reqs
requirement.install(
File "C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_internal\req\req_install.py", line 830, in install
six.reraise(*exc.parent)
File "C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_vendor\six.py", line 703, in reraise
raise value
File "C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_internal\operations\install\legacy.py", line 74, in install
runner(
File "C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_internal\utils\subprocess.py", line 289, in runner
call_subprocess(
File "C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip\_internal\utils\subprocess.py", line 258, in call_subprocess
raise InstallationSubprocessError(proc.returncode, command_desc)
pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: 'C:\Users\richa\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\richa\\AppData\\Local\\Temp\\pip-install-qmkhnwd9\\pyzmq_5afe9ee30b9042048bb360b2e27343c1\\setup.py'"'"'; __file__='"'"'C:\\Users\\richa\\AppData\\Local\\Temp\\pip-install-qmkhnwd9\\pyzmq_5afe9ee30b9042048bb360b2e27343c1\\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\richa\AppData\Local\Temp\pip-record-_wdqkm79\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\richa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\pyzmq' --enable-drafts '--zmq=C:\Users\richa\Desktop\build' Check the logs for full command output.
Removed build tracker: 'C:\\Users\\richa\\AppData\\Local\\Temp\\pip-req-tracker-7vjyapwi'
In good news, when trying to install pyzmq with drafts normally without the --zmq
option, the build now works. However, due to recent versions of pyzmq, it seems that pyzmq itself doesn't recognize the --enable-drafts install option. I can verify that it is indeed newer version of pyzmq due to the fact that older versions such as 19.0.2 works with the --enable-drafts option.
I'm trying to install pyzmq via pip via this command:
pip3 install pyzmq --install-option=--enable-drafts
. Normal installation without the--enable-drafts
install option works as expected. However, when using drafts, I get this long page with an error at the end:I'm using MSVC 2019 for reference.
I've also tried using this command to point to a compiled libzmq with drafts enabled via CMAKE:
pip3 install pyzmq --install-option=--enable-drafts --install-option=--zmq="C:\Users\richa\Desktop\zmq"
. It gives me these errors:Since I know where to find the .h files as mentioned in the error, I copied the include folder from libzmq into the main directory of my compiled libzmq. I tried again with the same command but then, it gave me this error:
Help would be appreciated. Thanks.