Load fetch_lfw_people using Proxy
I want to use this toy dataset for education.
But when I try to load it using builtin sklearn loader I got the error.
from sklearn import datasets
lfw_people = datasets.fetch_lfw_people(min_faces_per_person=50,
resize=0.4, data_home='.', )
Error:
urlopen error [WinError 10061]
I know it is about the proxy - usually to install new packages I use --proxy option.
But how to do it now? There is no such option in datasets.fetch_lfw_people
I thought about manual downloading it from the official website: http://vis-www.cs.umass.edu/lfw/#download
But I don't know which one to choose and how to open after that in python.
python-3.x proxy scikit-learn dataset jupyter-notebook
add a comment |
I want to use this toy dataset for education.
But when I try to load it using builtin sklearn loader I got the error.
from sklearn import datasets
lfw_people = datasets.fetch_lfw_people(min_faces_per_person=50,
resize=0.4, data_home='.', )
Error:
urlopen error [WinError 10061]
I know it is about the proxy - usually to install new packages I use --proxy option.
But how to do it now? There is no such option in datasets.fetch_lfw_people
I thought about manual downloading it from the official website: http://vis-www.cs.umass.edu/lfw/#download
But I don't know which one to choose and how to open after that in python.
python-3.x proxy scikit-learn dataset jupyter-notebook
add a comment |
I want to use this toy dataset for education.
But when I try to load it using builtin sklearn loader I got the error.
from sklearn import datasets
lfw_people = datasets.fetch_lfw_people(min_faces_per_person=50,
resize=0.4, data_home='.', )
Error:
urlopen error [WinError 10061]
I know it is about the proxy - usually to install new packages I use --proxy option.
But how to do it now? There is no such option in datasets.fetch_lfw_people
I thought about manual downloading it from the official website: http://vis-www.cs.umass.edu/lfw/#download
But I don't know which one to choose and how to open after that in python.
python-3.x proxy scikit-learn dataset jupyter-notebook
I want to use this toy dataset for education.
But when I try to load it using builtin sklearn loader I got the error.
from sklearn import datasets
lfw_people = datasets.fetch_lfw_people(min_faces_per_person=50,
resize=0.4, data_home='.', )
Error:
urlopen error [WinError 10061]
I know it is about the proxy - usually to install new packages I use --proxy option.
But how to do it now? There is no such option in datasets.fetch_lfw_people
I thought about manual downloading it from the official website: http://vis-www.cs.umass.edu/lfw/#download
But I don't know which one to choose and how to open after that in python.
python-3.x proxy scikit-learn dataset jupyter-notebook
python-3.x proxy scikit-learn dataset jupyter-notebook
asked Nov 22 '18 at 14:52
Mikhail_SamMikhail_Sam
3,00962542
3,00962542
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
fetch_lfw_people
will by default check the data in '~/scikit_learn_data/lfw_home'
to see if the dataset is already downloaded and correct or not (by matching hashes).
According to source code, it downloads 4 files from the following urls:
For targets
pairsDevTrain.txt: https://ndownloader.figshare.com/files/5976012
pairsDevTest.txt: https://ndownloader.figshare.com/files/5976009
pairs.txt: https://ndownloader.figshare.com/files/5976006
For data
lfw-funneled.tgz (Default): https://ndownloader.figshare.com/files/5976015
OR
lfw.tgz (when
funneled=False
): https://ndownloader.figshare.com/files/5976018
So you can download these files and keep them in the specified folder. After that, just call fetch_lfw_people
method and it will load the data from this location without connecting to internet.
Here ~
refers to the home location of user. You can use the following code to know the default location of that folder according to your system.
from sklearn.datasets import get_data_home
print(get_data_home())
Since you have changed that value to data_home='.'
, so you should use the ~/lfw_home
without 'scikit_learn_data'
(i.e. Make lfw_home
directly in the home folder).
Awesome advice, thank you! Are this link the only places I can download those datasets? Looks like it is blocked at my PC!
– Mikhail_Sam
Nov 26 '18 at 15:43
@Mikhail_Sam These are the locations sklearn uses to download the dataset. Maybe you can find other locations too. But I am not sure how they work with sklearn code then
– Vivek Kumar
Nov 27 '18 at 11:17
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53433512%2fload-fetch-lfw-people-using-proxy%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
fetch_lfw_people
will by default check the data in '~/scikit_learn_data/lfw_home'
to see if the dataset is already downloaded and correct or not (by matching hashes).
According to source code, it downloads 4 files from the following urls:
For targets
pairsDevTrain.txt: https://ndownloader.figshare.com/files/5976012
pairsDevTest.txt: https://ndownloader.figshare.com/files/5976009
pairs.txt: https://ndownloader.figshare.com/files/5976006
For data
lfw-funneled.tgz (Default): https://ndownloader.figshare.com/files/5976015
OR
lfw.tgz (when
funneled=False
): https://ndownloader.figshare.com/files/5976018
So you can download these files and keep them in the specified folder. After that, just call fetch_lfw_people
method and it will load the data from this location without connecting to internet.
Here ~
refers to the home location of user. You can use the following code to know the default location of that folder according to your system.
from sklearn.datasets import get_data_home
print(get_data_home())
Since you have changed that value to data_home='.'
, so you should use the ~/lfw_home
without 'scikit_learn_data'
(i.e. Make lfw_home
directly in the home folder).
Awesome advice, thank you! Are this link the only places I can download those datasets? Looks like it is blocked at my PC!
– Mikhail_Sam
Nov 26 '18 at 15:43
@Mikhail_Sam These are the locations sklearn uses to download the dataset. Maybe you can find other locations too. But I am not sure how they work with sklearn code then
– Vivek Kumar
Nov 27 '18 at 11:17
add a comment |
fetch_lfw_people
will by default check the data in '~/scikit_learn_data/lfw_home'
to see if the dataset is already downloaded and correct or not (by matching hashes).
According to source code, it downloads 4 files from the following urls:
For targets
pairsDevTrain.txt: https://ndownloader.figshare.com/files/5976012
pairsDevTest.txt: https://ndownloader.figshare.com/files/5976009
pairs.txt: https://ndownloader.figshare.com/files/5976006
For data
lfw-funneled.tgz (Default): https://ndownloader.figshare.com/files/5976015
OR
lfw.tgz (when
funneled=False
): https://ndownloader.figshare.com/files/5976018
So you can download these files and keep them in the specified folder. After that, just call fetch_lfw_people
method and it will load the data from this location without connecting to internet.
Here ~
refers to the home location of user. You can use the following code to know the default location of that folder according to your system.
from sklearn.datasets import get_data_home
print(get_data_home())
Since you have changed that value to data_home='.'
, so you should use the ~/lfw_home
without 'scikit_learn_data'
(i.e. Make lfw_home
directly in the home folder).
Awesome advice, thank you! Are this link the only places I can download those datasets? Looks like it is blocked at my PC!
– Mikhail_Sam
Nov 26 '18 at 15:43
@Mikhail_Sam These are the locations sklearn uses to download the dataset. Maybe you can find other locations too. But I am not sure how they work with sklearn code then
– Vivek Kumar
Nov 27 '18 at 11:17
add a comment |
fetch_lfw_people
will by default check the data in '~/scikit_learn_data/lfw_home'
to see if the dataset is already downloaded and correct or not (by matching hashes).
According to source code, it downloads 4 files from the following urls:
For targets
pairsDevTrain.txt: https://ndownloader.figshare.com/files/5976012
pairsDevTest.txt: https://ndownloader.figshare.com/files/5976009
pairs.txt: https://ndownloader.figshare.com/files/5976006
For data
lfw-funneled.tgz (Default): https://ndownloader.figshare.com/files/5976015
OR
lfw.tgz (when
funneled=False
): https://ndownloader.figshare.com/files/5976018
So you can download these files and keep them in the specified folder. After that, just call fetch_lfw_people
method and it will load the data from this location without connecting to internet.
Here ~
refers to the home location of user. You can use the following code to know the default location of that folder according to your system.
from sklearn.datasets import get_data_home
print(get_data_home())
Since you have changed that value to data_home='.'
, so you should use the ~/lfw_home
without 'scikit_learn_data'
(i.e. Make lfw_home
directly in the home folder).
fetch_lfw_people
will by default check the data in '~/scikit_learn_data/lfw_home'
to see if the dataset is already downloaded and correct or not (by matching hashes).
According to source code, it downloads 4 files from the following urls:
For targets
pairsDevTrain.txt: https://ndownloader.figshare.com/files/5976012
pairsDevTest.txt: https://ndownloader.figshare.com/files/5976009
pairs.txt: https://ndownloader.figshare.com/files/5976006
For data
lfw-funneled.tgz (Default): https://ndownloader.figshare.com/files/5976015
OR
lfw.tgz (when
funneled=False
): https://ndownloader.figshare.com/files/5976018
So you can download these files and keep them in the specified folder. After that, just call fetch_lfw_people
method and it will load the data from this location without connecting to internet.
Here ~
refers to the home location of user. You can use the following code to know the default location of that folder according to your system.
from sklearn.datasets import get_data_home
print(get_data_home())
Since you have changed that value to data_home='.'
, so you should use the ~/lfw_home
without 'scikit_learn_data'
(i.e. Make lfw_home
directly in the home folder).
answered Nov 23 '18 at 6:47
Vivek KumarVivek Kumar
16.4k42155
16.4k42155
Awesome advice, thank you! Are this link the only places I can download those datasets? Looks like it is blocked at my PC!
– Mikhail_Sam
Nov 26 '18 at 15:43
@Mikhail_Sam These are the locations sklearn uses to download the dataset. Maybe you can find other locations too. But I am not sure how they work with sklearn code then
– Vivek Kumar
Nov 27 '18 at 11:17
add a comment |
Awesome advice, thank you! Are this link the only places I can download those datasets? Looks like it is blocked at my PC!
– Mikhail_Sam
Nov 26 '18 at 15:43
@Mikhail_Sam These are the locations sklearn uses to download the dataset. Maybe you can find other locations too. But I am not sure how they work with sklearn code then
– Vivek Kumar
Nov 27 '18 at 11:17
Awesome advice, thank you! Are this link the only places I can download those datasets? Looks like it is blocked at my PC!
– Mikhail_Sam
Nov 26 '18 at 15:43
Awesome advice, thank you! Are this link the only places I can download those datasets? Looks like it is blocked at my PC!
– Mikhail_Sam
Nov 26 '18 at 15:43
@Mikhail_Sam These are the locations sklearn uses to download the dataset. Maybe you can find other locations too. But I am not sure how they work with sklearn code then
– Vivek Kumar
Nov 27 '18 at 11:17
@Mikhail_Sam These are the locations sklearn uses to download the dataset. Maybe you can find other locations too. But I am not sure how they work with sklearn code then
– Vivek Kumar
Nov 27 '18 at 11:17
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53433512%2fload-fetch-lfw-people-using-proxy%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown