First, you don't need Git bash to pip install
Python modules.
Only Git path (to use linux-like commands, plus curl
, even though it is available on recent Windows 10), from a regular CMD, with a simplified PATH
:
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%
set PH=C:\path\to\Python37
set PATH=%PH%;%PH%\Scripts
Second, you can pip install
in a corporate environment, provided:
- you access your proxy through
px
, an HTTP proxy server to automatically authenticate through an NTLM proxy
- you use and trust mirror alternatives for pip module sources.
Regarding genotrance/px
, simply run the service with px --proxy=my.company.prpxy:<port> --save --config=/path/to/your/px.ini
No need to enter your credentials (Windows log/password): the proxy uses your current login session.
Set your environment variable to reference that proxy:
set HTTP_PROXY=http://localhost:3128
set HTTPS_PROXY=http://localhost:3128
Then, this will work:
λ pip install -i http://pypi.mirror.frontiernet.net/simple --trusted-host pypi.mirror.frontiernet.net "ansible-tower-cli==3.2.1" --force-reinstall
Looking in indexes: http://pypi.mirror.frontiernet.net/simple
Collecting ansible-tower-cli==3.2.1
Downloading http://pypi.mirror.frontiernet.net/packages/98/39/566f2dc628917e28d6600607cd0a533b9ed02395297363b2db827e59e488/ansible-tower-cli-3.2.1.tar.gz (153kB)
100% |████████████████████████████████| 163kB 107kB/s
(Use any pypi mirror not blocked by your company=