Running quicker for Numpy and Pandas( installed via conda) than via pip?











up vote
3
down vote

favorite
1












I have two Python environments (3.6).



I installed packages in one environment via conda, and in another environment via pip.



Then I found that conda-provided numpy and pandas run quicker than pip version (for most of the scenario).



Just wonder why this happens. Is that because they use different configuration during compilation?










share|improve this question


















  • 1




    Most likely it is due to a different BLAS linked to numpy - e.g., see markus-beuckelmann.de/blog/boosting-numpy-blas.html
    – chrisb
    Nov 7 at 21:21















up vote
3
down vote

favorite
1












I have two Python environments (3.6).



I installed packages in one environment via conda, and in another environment via pip.



Then I found that conda-provided numpy and pandas run quicker than pip version (for most of the scenario).



Just wonder why this happens. Is that because they use different configuration during compilation?










share|improve this question


















  • 1




    Most likely it is due to a different BLAS linked to numpy - e.g., see markus-beuckelmann.de/blog/boosting-numpy-blas.html
    – chrisb
    Nov 7 at 21:21













up vote
3
down vote

favorite
1









up vote
3
down vote

favorite
1






1





I have two Python environments (3.6).



I installed packages in one environment via conda, and in another environment via pip.



Then I found that conda-provided numpy and pandas run quicker than pip version (for most of the scenario).



Just wonder why this happens. Is that because they use different configuration during compilation?










share|improve this question













I have two Python environments (3.6).



I installed packages in one environment via conda, and in another environment via pip.



Then I found that conda-provided numpy and pandas run quicker than pip version (for most of the scenario).



Just wonder why this happens. Is that because they use different configuration during compilation?







python pandas numpy anaconda






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 7 at 20:29









MTANG

1368




1368








  • 1




    Most likely it is due to a different BLAS linked to numpy - e.g., see markus-beuckelmann.de/blog/boosting-numpy-blas.html
    – chrisb
    Nov 7 at 21:21














  • 1




    Most likely it is due to a different BLAS linked to numpy - e.g., see markus-beuckelmann.de/blog/boosting-numpy-blas.html
    – chrisb
    Nov 7 at 21:21








1




1




Most likely it is due to a different BLAS linked to numpy - e.g., see markus-beuckelmann.de/blog/boosting-numpy-blas.html
– chrisb
Nov 7 at 21:21




Most likely it is due to a different BLAS linked to numpy - e.g., see markus-beuckelmann.de/blog/boosting-numpy-blas.html
– chrisb
Nov 7 at 21:21












1 Answer
1






active

oldest

votes

















up vote
2
down vote













Yes, most likely this difference is due to different compilation configurations. Numpy makes use of the low-level fortran libraries BLAS and LAPACK. The numpy that you get from pip is compiled with different implementations of BLAS and LAPACK than the numpy that you get from conda. The latter uses the MKL implementation which is optimized specifically for Intel processors.



You can check the implementation that numpy is using in a particular environment with:



import numpy as np
np.show_config()


Some comparison benchmarks can be found here (as already noted by crisb).






share|improve this answer























  • Thanks. I think it is exactly the case. I'm doing some heavy linear algebra calculation via numpy.
    – MTANG
    Nov 7 at 22:35











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',
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
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53197337%2frunning-quicker-for-numpy-and-pandas-installed-via-conda-than-via-pip%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








up vote
2
down vote













Yes, most likely this difference is due to different compilation configurations. Numpy makes use of the low-level fortran libraries BLAS and LAPACK. The numpy that you get from pip is compiled with different implementations of BLAS and LAPACK than the numpy that you get from conda. The latter uses the MKL implementation which is optimized specifically for Intel processors.



You can check the implementation that numpy is using in a particular environment with:



import numpy as np
np.show_config()


Some comparison benchmarks can be found here (as already noted by crisb).






share|improve this answer























  • Thanks. I think it is exactly the case. I'm doing some heavy linear algebra calculation via numpy.
    – MTANG
    Nov 7 at 22:35















up vote
2
down vote













Yes, most likely this difference is due to different compilation configurations. Numpy makes use of the low-level fortran libraries BLAS and LAPACK. The numpy that you get from pip is compiled with different implementations of BLAS and LAPACK than the numpy that you get from conda. The latter uses the MKL implementation which is optimized specifically for Intel processors.



You can check the implementation that numpy is using in a particular environment with:



import numpy as np
np.show_config()


Some comparison benchmarks can be found here (as already noted by crisb).






share|improve this answer























  • Thanks. I think it is exactly the case. I'm doing some heavy linear algebra calculation via numpy.
    – MTANG
    Nov 7 at 22:35













up vote
2
down vote










up vote
2
down vote









Yes, most likely this difference is due to different compilation configurations. Numpy makes use of the low-level fortran libraries BLAS and LAPACK. The numpy that you get from pip is compiled with different implementations of BLAS and LAPACK than the numpy that you get from conda. The latter uses the MKL implementation which is optimized specifically for Intel processors.



You can check the implementation that numpy is using in a particular environment with:



import numpy as np
np.show_config()


Some comparison benchmarks can be found here (as already noted by crisb).






share|improve this answer














Yes, most likely this difference is due to different compilation configurations. Numpy makes use of the low-level fortran libraries BLAS and LAPACK. The numpy that you get from pip is compiled with different implementations of BLAS and LAPACK than the numpy that you get from conda. The latter uses the MKL implementation which is optimized specifically for Intel processors.



You can check the implementation that numpy is using in a particular environment with:



import numpy as np
np.show_config()


Some comparison benchmarks can be found here (as already noted by crisb).







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 7 at 21:47

























answered Nov 7 at 21:39









Xukrao

1,6181622




1,6181622












  • Thanks. I think it is exactly the case. I'm doing some heavy linear algebra calculation via numpy.
    – MTANG
    Nov 7 at 22:35


















  • Thanks. I think it is exactly the case. I'm doing some heavy linear algebra calculation via numpy.
    – MTANG
    Nov 7 at 22:35
















Thanks. I think it is exactly the case. I'm doing some heavy linear algebra calculation via numpy.
– MTANG
Nov 7 at 22:35




Thanks. I think it is exactly the case. I'm doing some heavy linear algebra calculation via numpy.
– MTANG
Nov 7 at 22:35


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53197337%2frunning-quicker-for-numpy-and-pandas-installed-via-conda-than-via-pip%23new-answer', 'question_page');
}
);

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







這個網誌中的熱門文章

Xamarin.form Move up view when keyboard appear

Post-Redirect-Get with Spring WebFlux and Thymeleaf

Anylogic : not able to use stopDelay()