I've compiled pyzmq (python zeromq binding) module and want to use that one instead system one.
How to skip module loading from system so that my import zmq first searches in current folder?
I've compiled pyzmq (python zeromq binding) module and want to use that one instead system one.
How to skip module loading from system so that my import zmq first searches in current folder?
By installing it in a location that is listed earlier in sys.path
.
The directory your project is in, for example, is always listed first in sys.path
and other packages in the same directory will be found before system locations. In other words, put pyzmq
in the same folder as your script and it'll Just Work.
You can also add entries to sys.path
by listing them in the PYTHONPATH
environment variable; these will be inserted into sys.path
before system locations.