0

So I am trying to install the python package http_client or httplib on Windows 10 using Python3.7.3. But when I try to do this it returns an error that sort of tells me that libcurl is not installed.

I have googled the question and it the community just seems to say "install libcurl". Not helpful.

The error shows as follows:

cwd: C:\Users\user\AppData\Local\Temp\pip-install-fo_wbpht\pycurl\
    Complete output (1 lines):
    Please specify --curl-dir=/path/to/built/libcurl
    ----------------------------------------
ERROR: Command errored out with exit status 10: python setup.py egg_info Check the logs for full command output.

I am expecting it to just say "successfully installed" but instead get this error which I can't fix. Any help is really appreciated!

penguintr
  • 325
  • 1
  • 2
  • 14
  • Why is "install libcurl" not helpful advice? You can download from https://curl.haxx.se/download.html and then specify curl_dir as the installation path as described in the error message? – timchap Sep 09 '19 at 14:39
  • It was not helpful because it did not work. I went through those steps, tried again and it still does not work :/ – penguintr Sep 09 '19 at 14:49
  • Can you try running `pip install pycurl --curl-dir=/your/install/path/libcurl` first? (instead of `pip install httplib`) If that doesn't work, what error does it give? – timchap Sep 09 '19 at 14:51

2 Answers2

-1

import httplib ImportError: No module named httplib

You are running Python 2 code on Python 3. In Python 3, the module has been renamed to http.client.

Also, try looking for packages that have Windows support and follow their installation steps for Windows.

Look at possibly easier modules to install:

How to install requests module in python 3.4 version on windows?

Sergio Pulgarin
  • 869
  • 8
  • 20
  • The issue is not to do with requests as that package downloaded and installed fine. But then I was trying to install http.client and that still does not work with the exact same error :/ – penguintr Sep 09 '19 at 14:45
-1

Turns out this was to do with my permission settings set by my company. Issue resolved by white-listing the file for python.

penguintr
  • 325
  • 1
  • 2
  • 14