rez icon indicating copy to clipboard operation
rez copied to clipboard

ERROR: Failed building wheel for rez

Open ZhongLingXiao opened this issue 2 years ago • 6 comments

When install rez with command sudo python ./install.py, it always shows error:

  ERROR: Command errored out with exit status 1:
   command: /opt/rez/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-p7yh9q_z/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-p7yh9q_z/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-5d8m850i
       cwd: /tmp/pip-req-build-p7yh9q_z/
  Complete output (6 lines):
  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'
  ----------------------------------------
  ERROR: Failed building wheel for rez

Already installed pip and venv

sudo apt install python3-pip
sudo apt install python3.8-venv

Current wheel version is:

wheel                  0.34.2

Environment

  • OS ( wsl2 Ubuntu-20.04 )
  • Rez version ( master )
  • Rez python version ( Python 3.8.10 )

ZhongLingXiao avatar Jun 04 '22 09:06 ZhongLingXiao

Not on an Ubuntu machine atm, but do you run the install command with a target folder? If not could you please try that?

instinct-vfx avatar Jun 04 '22 19:06 instinct-vfx

Also, how did you install wheel? The wheel package is supposed to provide the bdist_wheel command to setuptools.

I used pip to install wheel. Also, tried this command to install rez: sudo python3 ./install.py /opt/rez And still get the same error

ZhongLingXiao avatar Jun 09 '22 16:06 ZhongLingXiao

If you installed wheel using ip, you might have overridden wheel that came from apt... unless you used pip install wheel --user.

Worst case scenario, run python -m pip install wheel setuptools --user then install rez.

Hi @JeanChristopheMorinPerso

After install wsl2(Ubuntu-20.04), it pre-installed python3.8 without venvand wheel. Before, I used pip install wheel command to install wheel

And as you mentioned above, pip install may overwrite apt's wheel. So this time I only use these 2 command to setup basic env for rez: sudo apt install python3.8-venv sudo apt install python-wheel-common

Still have the same issue.

ZhongLingXiao avatar Jun 10 '22 13:06 ZhongLingXiao

Generally speaking, you are not supposed to use apt to install python packages. Linux distros re-package PyPI packages for the purpose of giving a way to apt packages to depend on PyPI packages. But when re-packaging, Linux distros are free to mess with the packages themselves and the packages they provide don't necessarily matches the original packages.

All that to say is that you are not supposed to rely on them except if you want to be locked in the distro non-standard (read weird) behaviors.

Try with the command I gave you in my last reply:

python -m pip install wheel setuptools --user --upgrade

Note that the command doesn't use sudo and that it uses the --user and --upgrade flags. This tells pip to install the packages in your home folder, which won't affect the system packages. Also packages installed in your home will take precedence over system packages.

I had same issue as @ZhongLingXiao on my clean Ubuntu 20.04 deployment. I also followed advice given and had no success.

If you look in the below location in checked out code base you'll see three .whl files. /$parentDir/build_utils/virtualenv/virtualenv_support ($parentDir is your local location of the codebase you pulled from git )

I used the below command-lines to explicitly install the versions of setup tools and wheel.

pip install /$parentDir/build_utils/virtualenv/virtualenv_support/setuptools-41.0.1-py2.py3-none-any.whl

pip install /$parentDir/build_utils/virtualenv/virtualenv_support/wheel-0.33.4-py2.py3-none-any.whl I did not use pip3 nor installed the pip .whl file in that folder

I then was able to run install.py script as instructed and it installed. I'm now continuing on with this install and seems to work as expected when compared to Centos.

TxRxFx avatar Oct 04 '22 14:10 TxRxFx