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.
python python-3.x pip python-wheel
|
show 2 more comments
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.
python python-3.x pip python-wheel
2
Whenpipdoesn'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 inpip's cache for future reinstalls. on wheel build failure,pipswitches to the legacy installation from source dist (invokingpython setup.py install).
– hoefling
Nov 8 at 9:49
In your case, you're missing thewheelpackage sopipis unable to build wheels from source dists. if you want to explicitly disable building wheels, use the--no-binaryflag:pip install somepkg --no-binary=somepkg. Or usepip 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 packagepipneeds 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-binaryinstructs 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 havewheels(0.32.2) so that is not the problem. But maybe thepycparserpackage 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.gzfile is there and it is the source distribution on PyPI (a wheel would have a.whlextension)
– Serge Ballesta
Nov 8 at 12:23
|
show 2 more comments
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.
python python-3.x pip python-wheel
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
python python-3.x pip python-wheel
edited Nov 8 at 9:53
asked Nov 8 at 9:33
not2qubit
3,8663260
3,8663260
2
Whenpipdoesn'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 inpip's cache for future reinstalls. on wheel build failure,pipswitches to the legacy installation from source dist (invokingpython setup.py install).
– hoefling
Nov 8 at 9:49
In your case, you're missing thewheelpackage sopipis unable to build wheels from source dists. if you want to explicitly disable building wheels, use the--no-binaryflag:pip install somepkg --no-binary=somepkg. Or usepip 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 packagepipneeds 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-binaryinstructs 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 havewheels(0.32.2) so that is not the problem. But maybe thepycparserpackage 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.gzfile is there and it is the source distribution on PyPI (a wheel would have a.whlextension)
– Serge Ballesta
Nov 8 at 12:23
|
show 2 more comments
2
Whenpipdoesn'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 inpip's cache for future reinstalls. on wheel build failure,pipswitches to the legacy installation from source dist (invokingpython setup.py install).
– hoefling
Nov 8 at 9:49
In your case, you're missing thewheelpackage sopipis unable to build wheels from source dists. if you want to explicitly disable building wheels, use the--no-binaryflag:pip install somepkg --no-binary=somepkg. Or usepip 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 packagepipneeds 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-binaryinstructs 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 havewheels(0.32.2) so that is not the problem. But maybe thepycparserpackage 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.gzfile is there and it is the source distribution on PyPI (a wheel would have a.whlextension)
– 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
|
show 2 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
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
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
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
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
2
When
pipdoesn'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 inpip's cache for future reinstalls. on wheel build failure,pipswitches to the legacy installation from source dist (invokingpython setup.py install).– hoefling
Nov 8 at 9:49
In your case, you're missing the
wheelpackage sopipis unable to build wheels from source dists. if you want to explicitly disable building wheels, use the--no-binaryflag:pip install somepkg --no-binary=somepkg. Or usepip 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 packagepipneeds 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-binaryinstructs 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 thepycparserpackage 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.gzfile is there and it is the source distribution on PyPI (a wheel would have a.whlextension)– Serge Ballesta
Nov 8 at 12:23