While trying to install any package using pip I am getting error:
for example pip install pandas --proxy proxy_value
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', InvalidURL("URL can't contain control characters. ' ' (found at least ' ')"))': /simple/pandas
I have uninstalled python and freshly installed python 3.9.13 and set the system variables to C:\Users\richa1\AppData\Local\Programs\Python\Python39\Scripts\
I have checked with 3.10.5 too.
But still not able to fix it. I am not sure if this is some issue with installed file or something I need to set.
As discussed in the comments, the error stems from a malformed HTTP proxy setting.
In this case, the http_proxy
variable had been set to ''
instead of the empty string, and a quote character is indeed a control character not allowed in an URL.