Closed fernandojsg closed 10 years ago
Hi, @kile.
Can you give more information?
--proxy
?I don't use python very much. So I'm not familiar pip.
But I found StackOverFlow:Using pip behind a proxy
sudo -E pip install somepackage
Can you try it?
Hi @otahi Thank you very much! It works with the sudo -E option. It seems that the HTTP_PROXY environment variable is not set for the root user so it needs the -E option.
Now I've it workiing without problem.
Btw the OS was a Ubuntu Server 14 and this code correspond to a provision puppet file for installing python packages.
Thank you again
@otahi, @fernandojsg,
Am in a similar situation - pip doesn't work behind proxy in my vagrant guest. Can you please help me address this?
Where do I setup the sudo -E option? In VagrantFile?
Can you please help elaborate?
Regards, Radha.
Hi @sradhakrishna
You should inlcude the -E
option where you call pip
.
I've a puppet
module for install python requirements.
This of this file (puppet\modules\python\manifests\init.pp
) is the following:
class python {
package { [ 'python', 'python-virtualenv', 'python-dev', 'python-pip', 'build-essential',
'libxml2-dev', 'libxslt1-dev', 'python-lxml',
'libjpeg8', 'libjpeg62-dev', 'libfreetype6', 'libfreetype6-dev' ]:
ensure => installed,
}
# Let's install the project dependecies from pip
exec { "pip-install-requirements":
command => "sudo -E /usr/bin/pip install -r /vagrant/serverside/requirements.txt",
tries => 2,
timeout => 600, # Too long, but this can take awhile
require => Package['python-pip', 'python-dev'], # The package dependecies needs to run first
logoutput => on_failure,
}
}
Note how I use a command with sudo -E
to install the packages required by my webapp, defined on a .txt instead of the puppet itself.
Dear all,
I've used
vagrant-proxyconf
and it works well with apt-get without problems, but It seems it's not recognized bypip
so I need to set it by hand like:Is there any way to get it working with the plugin? Or at least access to the
config.proxy.http
variables defined on the VagrantFile ?