Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Failed building wheel for rez #1315

Closed
ZhongLingXiao opened this issue Jun 4, 2022 · 7 comments
Closed

ERROR: Failed building wheel for rez #1315

ZhongLingXiao opened this issue Jun 4, 2022 · 7 comments

Comments

@ZhongLingXiao
Copy link

ZhongLingXiao commented Jun 4, 2022

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 )
@instinct-vfx
Copy link
Contributor

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

@JeanChristopheMorinPerso
Copy link
Member

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

@ZhongLingXiao
Copy link
Author

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

@JeanChristopheMorinPerso
Copy link
Member

JeanChristopheMorinPerso commented Jun 9, 2022

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.

@ZhongLingXiao
Copy link
Author

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.

@JeanChristopheMorinPerso
Copy link
Member

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.

@TxRxFx
Copy link

TxRxFx commented Oct 4, 2022

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.

@JeanChristopheMorinPerso JeanChristopheMorinPerso closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants