Closed
Description
ub1404@ub1404-A:~/github/tensorflow$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
Wed Nov 25 02:32:35 EST 2015 : === Using tmpdir: /tmp/tmp.lVOy4pRiQ5
/tmp/tmp.lVOy4pRiQ5 ~/github/tensorflow
Wed Nov 25 02:32:35 EST 2015 : === Building wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
Reacted by Navin Francis Shajan, MingyiLiang, tioteath, Casey Primozic, TitanFighter, Alex Strizhak, Jojimon Varghese and umatbro
Metadata
Metadata
Assignees
Labels
No labels
Activity
chenghuige commentedon Nov 25, 2015
pip install wheel
andyyuan78 commentedon Nov 25, 2015
ub1404@ub1404-A:~/github/tensorflow$ sudo pip install wheel
[sudo] password for ub1404:
The directory '/home/ub1404/.cache/pip/log' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
The directory '/home/ub1404/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
You are using pip version 6.0.8, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The directory '/home/ub1404/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
Collecting wheel
Downloading wheel-0.26.0-py2.py3-none-any.whl (63kB)
100% |################################| 65kB 837kB/s
Installing collected packages: wheel
Successfully installed wheel-0.26.0
ub1404@ub1404-A:
/github/tensorflow$/github/tensorflow$ub1404@ub1404-A:
ub1404@ub1404-A:~/github/tensorflow$ sudo bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
Wed Nov 25 03:06:54 EST 2015 : === Using tmpdir: /tmp/tmp.6aZe9fEjxd
/tmp/tmp.6aZe9fEjxd ~/github/tensorflow
Wed Nov 25 03:06:54 EST 2015 : === Building wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
ub1404@ub1404-A:~/github/tensorflow$
andyyuan78 commentedon Nov 25, 2015
pip install wheel can sovle this issue.
I used pip2 install wheel since my installed both py2 and py3
turbojava commentedon Mar 15, 2017
I encountered the same problem and worked it out. It seems that python can't find wheel module.
Does you use pyenv-virtualenv? you should install wheel on global python
pablote commentedon Sep 13, 2017
anyone still having this problem? I have wheel installed in both pip2 and pip3, still the command fails
matan1 commentedon Dec 25, 2017
I was having this problem and for me it was not sufficient to simply execute "
sudo pip install wheel".To investigate further I looked into the bazel-bin/tensorflow/tools/pip_package/build_pip_package script to see how it was loading python, where I found these lines:
The shell script sourced there is the one liner:
export PYTHON_BIN_PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin/python"
Which is the python version I selected when configuring my tensorflow build.
The pip on my path, however, was for python 3.5, which you can see by calling
pip --versionorwhich pip. So my calls tosudo pip install wheelwere only installing to the 3.5 version. The solution for me was to explicitly call the version of pip for the version/install of python you are building tensorflow with. In my case, that was:sudo /Library/Frameworks/Python.framework/Versions/2.7/bin/pip install wheelAfter that, the build_pip_package script worked for me.
esbolice commentedon Jul 26, 2018
Maybe use sudo chown you_user_name /path/to/project/evn/* -R
it was good for me!
relh commentedon Apr 27, 2020
if you're on ubuntu and it doesn't work, see this:
https://stackoverflow.com/a/59596814/2353085
romelgomez commentedon May 30, 2020
@relh
I builded a script to have various environments in one project DEV, QA, etc, in each run, I delete the .temp folder, where is the venv for each environment, and I get the error error:
invalid command 'bdist_wheel', I realize that the error disappears if I don't delete the folder, but then I add the installpip3 install wheelbefore install the other libs and that resolved the problem too.repo: https://github.com/romelgomez/python-project-with-various-environments-example
Update XNNPACK in XLA