PIP how escape character # in password?
<p>want to continue question
<a href="http://stackoverflow.com/questions/19080352/how-to-get-pip-to-work-behind-a-proxy-server/39206294#39206294">How to get pip to work behind a proxy server</a></p>

<p>I have Windows Server and Python 3.5 (64).</p>

<p>In password my user include #.</p>

<p>I try to use some solve:</p>

<pre>
"C:\Program Files\Python35\scripts\pip.exe" install --proxy http://proxy_user:pwd#123@proxy.su:1111 TwitterApi

"C:\Program Files\Python35\scripts\pip.exe" install --proxy "http://proxy_user:pwd#123"@proxy.su:1111 TwitterApi

"C:\Program Files\Python35\scripts\pip.exe" install --proxy http://"proxy_user:pwd#123"@proxy.su:1111 TwitterApi

"C:\Program Files\Python35\scripts\pip.exe" install --proxy http://proxy_user:"pwd#123"@proxy.su:1111 TwitterApi
</pre>

<p>BUT to get error</p>

<pre>
  File "c:\program files\python35\lib\site-packages\pip\_vendor\requests\package
s\urllib3\util\url.py", line 189, in parse_url
    raise LocationParseError(url)
pip._vendor.requests.packages.urllib3.exceptions.LocationParseError: Failed to p
arse: proxy_user:pwd
</pre>

<p>How escape character # in this case?</p>

<pre><code>else examples
</code></pre>

<pre>

    $user = str_replace('@', '%40', $user);
    $pass = str_replace('%', '%25', $pass); // don't down! (%)
    $pass = str_replace('#', '%23', $pass);
    $pass = str_replace('@', '%40', $pass);
    $pass = str_replace(':', '%3a', $pass);
    $pass = str_replace(';', '%3b', $pass);
    $pass = str_replace('?', '%3f', $pass);
    $pass = str_replace('$', '%24', $pass);
    $pass = str_replace('!', '%21', $pass);
    $pass = str_replace('/', '%2f', $pass);
    $pass = str_replace('\'', '%27', $pass);
    $pass = str_replace('"', '%22', $pass);

</pre>

python python-3.x pip http-proxy