optscale icon indicating copy to clipboard operation
optscale copied to clipboard

Error Building wheel for ansible

Open romsworld opened this issue 2 years ago • 2 comments

Hi,

I have this error :

/home/support/optscale/optscale-deploy# pip install -r requirements.txt

Building wheels for collected packages: ansible, PyYAML Building wheel for ansible (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/support/optscale/optscale-deploy/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bcu0sgrd/ansible/setup.py'"'"'; file='"'"'/tmp/pip-install-bcu0sgrd/ansible/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-m1pnryj3 cwd: /tmp/pip-install-bcu0sgrd/ansible/ 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 ansible Running setup.py clean for ansible Building wheel for PyYAML (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/support/optscale/optscale-deploy/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bcu0sgrd/PyYAML/setup.py'"'"'; file='"'"'/tmp/pip-install-bcu0sgrd/PyYAML/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-t8af6cjm cwd: /tmp/pip-install-bcu0sgrd/PyYAML/ 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 PyYAML Running setup.py clean for PyYAML Failed to build ansible PyYAML ERROR: google-auth 2.22.0 has requirement urllib3<2.0, but you'll have urllib3 2.0.4 which is incompatible.

Any idea ?

romsworld avatar Sep 01 '23 09:09 romsworld

Hi @romsworld, I would try the following:

  1. python -m pip install --upgrade pip
  2. pip install setuptools
  3. pip install wheel

In most cases, just upgrading pip should solve it, giving you also the following message:

Using legacy 'setup.py install' for ansible, since package 'wheel' is not installed.
Using legacy 'setup.py install' for PyYAML, since package 'wheel' is not installed.

...

Running setup.py install for PyYAML ... done
Running setup.py install for ansible ... done

KonScanner avatar Sep 14 '23 16:09 KonScanner

@romsworld please provide full

pip install -r requirements.txt

output

nexusriot avatar Oct 10 '23 09:10 nexusriot