I attempted to install the xmltodict python package using a proxy server, and storing the $userid and $password values in a bash variable
pip3 install xmltodict --proxy "http://$userid:$password@<hostname>:<port_number>" --user
However I received the following Error:
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionE rror('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe7ac8282b0>: Failed to establish a new connection: [Errno -2] Name or service not known ', ) ) ' : /simple/xmltodict/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionE rror('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe7ac828518>: Failed to establish a new connection: [Errno -2] Name or service not known',))': /simple/xmltodict/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionE rror('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe7ac828128>: Failed to establish a new connection: [Errno -2] Name or service not known',))': /simple/xmltodict/
Retrying (Retry(total=l, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionE rror('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe7ac828400>: Failed to establish a new connection: [Errno -2] Name or service not known',))': /simple/xmltodict/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionE rror('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe7ac828da0>: Failed to establish a new connection: [Errno -2] Name or service not known',))': /simple/xmltodict/
Could not find a version that satisfies the requirement xmltodict (from versions: )
No matching distribution found for xmltodict
My hunch was to change my password as it had trailing hashtags and it could be getting confused with bash's meaning of hashtags. An attempt at explicitly defining my username and password in the command and to escape the trailing hashtag with a \ was made, but to no success. I changed my password, and successfully installed the xmltodict package.
My question is: Is there a different way to escape a hashtag?