I work on a Ubuntu VM in my company's laptop which uses proxy server for connecting to internet.
After some research I found out how to install modules using pip install
with proxy. For example, using this command I can install my virtualenv module:
sudo pip install --proxy=http://user:pass@<proxy_address>:<portnumber> virtualenv
However, after creating a virtual environment folder, activate it and then install a module using this pip command:
pip install --proxy=http://user:pass@<proxy_address>:<portnumber> pyperclip
I get this error:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pyperclip/
If I use sudo
, pip can download and install the module, but in system global package instead of in my virtual environment. It seems for me a permission issues in my Ubuntu and its proxy setting.
How can I tackle this issue, so that I can install a module locally in my virtualenv?
Thanks