What is the meaning of “Failed building wheel for X” in pip install?











up vote
0
down vote

favorite












This is a truly popular question here at SO, but none of the many answers I have looked at, clearly explain what this error really mean, and why it occurs.



One source of confusion, is that when (for example) you do pip install pycparser, you first get the error:



Failed building wheel for pycparser



which is then followed by the message that the package was:



Successfully installed pycparser-2.19.





# pip3 install pycparser

Collecting pycparser
Using cached https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
Building wheels for collected packages: pycparser
Running setup.py bdist_wheel for pycparser ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-g_v28hpp/pycparser/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-__w_f6p0 --python-tag cp36:
Traceback (most recent call last):
File "<string>", line 1, in <module>
...
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2349, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'wheel.bdist_wheel'

----------------------------------------
Failed building wheel for pycparser
Running setup.py clean for pycparser
Failed to build pycparser
Installing collected packages: pycparser
Running setup.py install for pycparser ... done
Successfully installed pycparser-2.19


What is going on here?



(I would like to understand how something can fail but still get installed and whether you can trust this package functioning correctly?)



So far the best partial explanation I have found is this.





BTW / Solution:



The solution to the above problem is most often to make sure to disable the cached copy by using: pip install <package> --no-cache-dir.










share|improve this question




















  • 2




    When pip doesn't find a wheel for the requirement, it downloads the source dist and tries to build a wheel from it locally. on success, the wheel is stored in pip's cache for future reinstalls. on wheel build failure, pip switches to the legacy installation from source dist (invoking python setup.py install).
    – hoefling
    Nov 8 at 9:49










  • In your case, you're missing the wheel package so pip is unable to build wheels from source dists. if you want to explicitly disable building wheels, use the --no-binary flag: pip install somepkg --no-binary=somepkg. Or use pip install somepkg --no-binary=:all:, but beware that this will disable wheels for every package selected for installation, including dependencies; if there is no source dist available for some package pip needs to install, the installation will fail.
    – hoefling
    Nov 8 at 9:54








  • 1




    @hoefling: your first comment was the true reason and could be an answer. The second one is wrong: --no-binary instructs pip to only download and use source distributions. The flag to prevent it to build a local binary wheel is indeed --no-cache-dir.
    – Serge Ballesta
    Nov 8 at 11:03










  • @hoefling I have wheels (0.32.2) so that is not the problem. But maybe the pycparser package doesn't have a wheel (*.whl) associated? But how can I check this a-priori?
    – not2qubit
    Nov 8 at 11:18








  • 1




    You can consult the PyPI site at pypi.org/project/pycparser and then asks for the files. You can then see that only a .tar.gz file is there and it is the source distribution on PyPI (a wheel would have a .whl extension)
    – Serge Ballesta
    Nov 8 at 12:23















up vote
0
down vote

favorite












This is a truly popular question here at SO, but none of the many answers I have looked at, clearly explain what this error really mean, and why it occurs.



One source of confusion, is that when (for example) you do pip install pycparser, you first get the error:



Failed building wheel for pycparser



which is then followed by the message that the package was:



Successfully installed pycparser-2.19.





# pip3 install pycparser

Collecting pycparser
Using cached https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
Building wheels for collected packages: pycparser
Running setup.py bdist_wheel for pycparser ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-g_v28hpp/pycparser/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-__w_f6p0 --python-tag cp36:
Traceback (most recent call last):
File "<string>", line 1, in <module>
...
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2349, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'wheel.bdist_wheel'

----------------------------------------
Failed building wheel for pycparser
Running setup.py clean for pycparser
Failed to build pycparser
Installing collected packages: pycparser
Running setup.py install for pycparser ... done
Successfully installed pycparser-2.19


What is going on here?



(I would like to understand how something can fail but still get installed and whether you can trust this package functioning correctly?)



So far the best partial explanation I have found is this.





BTW / Solution:



The solution to the above problem is most often to make sure to disable the cached copy by using: pip install <package> --no-cache-dir.










share|improve this question




















  • 2




    When pip doesn't find a wheel for the requirement, it downloads the source dist and tries to build a wheel from it locally. on success, the wheel is stored in pip's cache for future reinstalls. on wheel build failure, pip switches to the legacy installation from source dist (invoking python setup.py install).
    – hoefling
    Nov 8 at 9:49










  • In your case, you're missing the wheel package so pip is unable to build wheels from source dists. if you want to explicitly disable building wheels, use the --no-binary flag: pip install somepkg --no-binary=somepkg. Or use pip install somepkg --no-binary=:all:, but beware that this will disable wheels for every package selected for installation, including dependencies; if there is no source dist available for some package pip needs to install, the installation will fail.
    – hoefling
    Nov 8 at 9:54








  • 1




    @hoefling: your first comment was the true reason and could be an answer. The second one is wrong: --no-binary instructs pip to only download and use source distributions. The flag to prevent it to build a local binary wheel is indeed --no-cache-dir.
    – Serge Ballesta
    Nov 8 at 11:03










  • @hoefling I have wheels (0.32.2) so that is not the problem. But maybe the pycparser package doesn't have a wheel (*.whl) associated? But how can I check this a-priori?
    – not2qubit
    Nov 8 at 11:18








  • 1




    You can consult the PyPI site at pypi.org/project/pycparser and then asks for the files. You can then see that only a .tar.gz file is there and it is the source distribution on PyPI (a wheel would have a .whl extension)
    – Serge Ballesta
    Nov 8 at 12:23













up vote
0
down vote

favorite









up vote
0
down vote

favorite











This is a truly popular question here at SO, but none of the many answers I have looked at, clearly explain what this error really mean, and why it occurs.



One source of confusion, is that when (for example) you do pip install pycparser, you first get the error:



Failed building wheel for pycparser



which is then followed by the message that the package was:



Successfully installed pycparser-2.19.





# pip3 install pycparser

Collecting pycparser
Using cached https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
Building wheels for collected packages: pycparser
Running setup.py bdist_wheel for pycparser ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-g_v28hpp/pycparser/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-__w_f6p0 --python-tag cp36:
Traceback (most recent call last):
File "<string>", line 1, in <module>
...
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2349, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'wheel.bdist_wheel'

----------------------------------------
Failed building wheel for pycparser
Running setup.py clean for pycparser
Failed to build pycparser
Installing collected packages: pycparser
Running setup.py install for pycparser ... done
Successfully installed pycparser-2.19


What is going on here?



(I would like to understand how something can fail but still get installed and whether you can trust this package functioning correctly?)



So far the best partial explanation I have found is this.





BTW / Solution:



The solution to the above problem is most often to make sure to disable the cached copy by using: pip install <package> --no-cache-dir.










share|improve this question















This is a truly popular question here at SO, but none of the many answers I have looked at, clearly explain what this error really mean, and why it occurs.



One source of confusion, is that when (for example) you do pip install pycparser, you first get the error:



Failed building wheel for pycparser



which is then followed by the message that the package was:



Successfully installed pycparser-2.19.





# pip3 install pycparser

Collecting pycparser
Using cached https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
Building wheels for collected packages: pycparser
Running setup.py bdist_wheel for pycparser ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-g_v28hpp/pycparser/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-__w_f6p0 --python-tag cp36:
Traceback (most recent call last):
File "<string>", line 1, in <module>
...
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2349, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'wheel.bdist_wheel'

----------------------------------------
Failed building wheel for pycparser
Running setup.py clean for pycparser
Failed to build pycparser
Installing collected packages: pycparser
Running setup.py install for pycparser ... done
Successfully installed pycparser-2.19


What is going on here?



(I would like to understand how something can fail but still get installed and whether you can trust this package functioning correctly?)



So far the best partial explanation I have found is this.





BTW / Solution:



The solution to the above problem is most often to make sure to disable the cached copy by using: pip install <package> --no-cache-dir.







python python-3.x pip python-wheel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 at 9:53

























asked Nov 8 at 9:33









not2qubit

3,8663260




3,8663260








  • 2




    When pip doesn't find a wheel for the requirement, it downloads the source dist and tries to build a wheel from it locally. on success, the wheel is stored in pip's cache for future reinstalls. on wheel build failure, pip switches to the legacy installation from source dist (invoking python setup.py install).
    – hoefling
    Nov 8 at 9:49










  • In your case, you're missing the wheel package so pip is unable to build wheels from source dists. if you want to explicitly disable building wheels, use the --no-binary flag: pip install somepkg --no-binary=somepkg. Or use pip install somepkg --no-binary=:all:, but beware that this will disable wheels for every package selected for installation, including dependencies; if there is no source dist available for some package pip needs to install, the installation will fail.
    – hoefling
    Nov 8 at 9:54








  • 1




    @hoefling: your first comment was the true reason and could be an answer. The second one is wrong: --no-binary instructs pip to only download and use source distributions. The flag to prevent it to build a local binary wheel is indeed --no-cache-dir.
    – Serge Ballesta
    Nov 8 at 11:03










  • @hoefling I have wheels (0.32.2) so that is not the problem. But maybe the pycparser package doesn't have a wheel (*.whl) associated? But how can I check this a-priori?
    – not2qubit
    Nov 8 at 11:18








  • 1




    You can consult the PyPI site at pypi.org/project/pycparser and then asks for the files. You can then see that only a .tar.gz file is there and it is the source distribution on PyPI (a wheel would have a .whl extension)
    – Serge Ballesta
    Nov 8 at 12:23














  • 2




    When pip doesn't find a wheel for the requirement, it downloads the source dist and tries to build a wheel from it locally. on success, the wheel is stored in pip's cache for future reinstalls. on wheel build failure, pip switches to the legacy installation from source dist (invoking python setup.py install).
    – hoefling
    Nov 8 at 9:49










  • In your case, you're missing the wheel package so pip is unable to build wheels from source dists. if you want to explicitly disable building wheels, use the --no-binary flag: pip install somepkg --no-binary=somepkg. Or use pip install somepkg --no-binary=:all:, but beware that this will disable wheels for every package selected for installation, including dependencies; if there is no source dist available for some package pip needs to install, the installation will fail.
    – hoefling
    Nov 8 at 9:54








  • 1




    @hoefling: your first comment was the true reason and could be an answer. The second one is wrong: --no-binary instructs pip to only download and use source distributions. The flag to prevent it to build a local binary wheel is indeed --no-cache-dir.
    – Serge Ballesta
    Nov 8 at 11:03










  • @hoefling I have wheels (0.32.2) so that is not the problem. But maybe the pycparser package doesn't have a wheel (*.whl) associated? But how can I check this a-priori?
    – not2qubit
    Nov 8 at 11:18








  • 1




    You can consult the PyPI site at pypi.org/project/pycparser and then asks for the files. You can then see that only a .tar.gz file is there and it is the source distribution on PyPI (a wheel would have a .whl extension)
    – Serge Ballesta
    Nov 8 at 12:23








2




2




When pip doesn't find a wheel for the requirement, it downloads the source dist and tries to build a wheel from it locally. on success, the wheel is stored in pip's cache for future reinstalls. on wheel build failure, pip switches to the legacy installation from source dist (invoking python setup.py install).
– hoefling
Nov 8 at 9:49




When pip doesn't find a wheel for the requirement, it downloads the source dist and tries to build a wheel from it locally. on success, the wheel is stored in pip's cache for future reinstalls. on wheel build failure, pip switches to the legacy installation from source dist (invoking python setup.py install).
– hoefling
Nov 8 at 9:49












In your case, you're missing the wheel package so pip is unable to build wheels from source dists. if you want to explicitly disable building wheels, use the --no-binary flag: pip install somepkg --no-binary=somepkg. Or use pip install somepkg --no-binary=:all:, but beware that this will disable wheels for every package selected for installation, including dependencies; if there is no source dist available for some package pip needs to install, the installation will fail.
– hoefling
Nov 8 at 9:54






In your case, you're missing the wheel package so pip is unable to build wheels from source dists. if you want to explicitly disable building wheels, use the --no-binary flag: pip install somepkg --no-binary=somepkg. Or use pip install somepkg --no-binary=:all:, but beware that this will disable wheels for every package selected for installation, including dependencies; if there is no source dist available for some package pip needs to install, the installation will fail.
– hoefling
Nov 8 at 9:54






1




1




@hoefling: your first comment was the true reason and could be an answer. The second one is wrong: --no-binary instructs pip to only download and use source distributions. The flag to prevent it to build a local binary wheel is indeed --no-cache-dir.
– Serge Ballesta
Nov 8 at 11:03




@hoefling: your first comment was the true reason and could be an answer. The second one is wrong: --no-binary instructs pip to only download and use source distributions. The flag to prevent it to build a local binary wheel is indeed --no-cache-dir.
– Serge Ballesta
Nov 8 at 11:03












@hoefling I have wheels (0.32.2) so that is not the problem. But maybe the pycparser package doesn't have a wheel (*.whl) associated? But how can I check this a-priori?
– not2qubit
Nov 8 at 11:18






@hoefling I have wheels (0.32.2) so that is not the problem. But maybe the pycparser package doesn't have a wheel (*.whl) associated? But how can I check this a-priori?
– not2qubit
Nov 8 at 11:18






1




1




You can consult the PyPI site at pypi.org/project/pycparser and then asks for the files. You can then see that only a .tar.gz file is there and it is the source distribution on PyPI (a wheel would have a .whl extension)
– Serge Ballesta
Nov 8 at 12:23




You can consult the PyPI site at pypi.org/project/pycparser and then asks for the files. You can then see that only a .tar.gz file is there and it is the source distribution on PyPI (a wheel would have a .whl extension)
– Serge Ballesta
Nov 8 at 12:23

















active

oldest

votes











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%2f53204916%2fwhat-is-the-meaning-of-failed-building-wheel-for-x-in-pip-install%23new-answer', 'question_page');
}
);

Post as a guest





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53204916%2fwhat-is-the-meaning-of-failed-building-wheel-for-x-in-pip-install%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

鏡平學校

ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

Why https connections are so slow when debugging (stepping over) in Java?