Posted on

I recently attempted to install PycURL library on my Windows 10 Python installation, with various challenges.

Running the usual pip install pycurl command gave me the following output:

> pip install pycurl
Collecting pycurl
  Using cached pycurl-7.45.1.tar.gz (233 kB)
  Preparing metadata ( ... error
  error: subprocess-exited-with-error

  × python egg_info did not run successfully.
  ╰─> [5 lines of output]
        if LooseVersion(distutils.__version__) > LooseVersion("1.0.1"):
        if LooseVersion(distutils.__version__) < LooseVersion("1.0.3"):
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Searching the web led me to these installation instructions: There are currently no official binary Windows packages. You can build PycURL from source or use third-party binary packages.

Searching a little bit more on the web for official binary Windows packages led me to this stackoverflow thread, linking to these unofficial binaries.

I tried downloading and installing the topmost result (pycurl-7.45.1-pp38-pypy38_pp73-win_amd64.whl) without success.

> pip install "T:\pycurl-7.45.1-pp38-pypy38_pp73-win_amd64.whl"
ERROR: pycurl-7.45.1-pp38-pypy38_pp73-win_amd64.whl is not a supported wheel on this platform.

A solution to this issue may be found in this stackoverflow thread:

> pip debug --verbose
WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
pip version: pip 22.3.1 from /.../
Compatible tags: 36

Finding a compatible Python version and architecture led me to finally having a successful installation of PycURL.

> pip install "T:\pycurl-7.45.1-cp310-cp310-win_amd64.whl"
Processing t:\pycurl-7.45.1-cp310-cp310-win_amd64.whl
Installing collected packages: pycurl
Successfully installed pycurl-7.45.1
comments powered by Disqus