First some background:
A part of the magic of python is the pip & install tools which will fetch and install libraries and their dependencies. However, sometimes the library or it's dependency includes platform specific binary code built from other languages such as C & C++.
The initial solution to dealing with these was to distribute the source code and the build instructions for them and for setup tools to auto-magically build the source into the binaries for the current platform.
The shortcomings of this system are that you might not have some of the files that are needed to build the item(s) and of course you need the correct compiler. On systems such as Linux this is not a problem as the build tools are usually pre-installed and are freely available if they are missing. One MS-Windows there isn't a default compiler shipped with the systems and the build tool chain may cost serious money. From this the Wheel format was born which allow package authors to pre-build the extensions for each platform and upload the resulting wheels which pip can find and install.
The only problem that remains is not all package authors have the time or tools to do this build. Enter the marvelous Christoph Gohlke of Laboratory for Fluorescence Dynamics, University of California, Irvine who has for several years made the effort to unofficially build many of the commonly used packages and a lot of us know, when we hit errors such as yours, to head over to https://www.lfd.uci.edu/~gohlke/pythonlibs/ find the correct package, download it and install it.
Finally the solution
There is now a lovely tool called pipwin which does the job for you.
The process goes as follows:
Install pipwin with:
pip install pipwin
Try to install your target package in a normal way, (in your case
jupyter notebook):
pip install jupyter_notebook
Hit an error, e.g. in this case pyzmq
pipwin install pyzmq
This will find pyzmq
for your specific python on the site above, download and install it
- Try to
pip install
the original package again in the normal way, this time it doesn't try to install pyzmq
as it already exists but of course you may hit another error - if you do just pipwin install
that package and repeat until it works.
Alternatively
You can look up which specific compiler you need for the python that you are running, find a free copy if one exists or buy a copy of it, install it correctly not always easy & set all of the appropriate environmental variables, download the required package build dependencies and then pip
will likely do the job nicely.