pip install using proxy in a virtual environment

 ̄綄美尐妖づ 提交于 2019-11-30 10:24:39

Meanwhile, I know the solution. pip needs the environment variable HTTP_PROXY and HTTPS_PROXY in capital letters, instead of http_proxy. So append below text pattern at the end of your your '~/.bashrc'

HTTP_PROXY=http://username:pass@proxyaddress:port
export HTTP_PROXY
HTTPS_PROXY=http://username:pass@proxyaddress:port
export HTTPS_PROXY

Then, run source ~/.bashrc Now you can install all python packages using pip in your Ubuntu VM with proxy login.

Do not activate the virtualenv and run your pip install --proxy ... command with the full path to your virtualenv pip i.e.

C:\Users\name\myvenv\Scripts\pip install --proxy=http://user:pass@<proxy_address>:<portnumber> virtualenv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!