home-assistant-ecosystem / home-assistant-cli

:computer: Command-line tool for Home Assistant
Other
445 stars 68 forks source link

No module named 'six.moves'; 'six' is not a package #166

Closed ndarilek closed 5 years ago

ndarilek commented 5 years ago

Getting the following error when running hass-cli -x entity list with the latest Git version as of now:

No module named 'six.moves'; 'six' is not a package Traceback (most recent call last): File "/home/nolan/.local/lib/python3.7/site-packages/homeassistant_cli/cli.py", line 39, in run result = cli.main(standalone_mode=False) File "/home/nolan/.local/lib/python3.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/home/nolan/.local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/nolan/.local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/nolan/.local/lib/python3.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/nolan/.local/lib/python3.7/site-packages/click/core.py", line 555, in invoke return callback(*args, *kwargs) File "/home/nolan/.local/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func return ctx.invoke(f, obj, args, kwargs) File "/home/nolan/.local/lib/python3.7/site-packages/click/core.py", line 555, in invoke return callback(*args, *kwargs) File "/home/nolan/.local/lib/python3.7/site-packages/homeassistant_cli/plugins/entity.py", line 83, in listcmd columns=ctx.columns if ctx.columns else const.COLUMNS_ENTITIES, File "/home/nolan/.local/lib/python3.7/site-packages/homeassistant_cli/helper.py", line 133, in format_output ctx.sort_by, File "/home/nolan/.local/lib/python3.7/site-packages/homeassistant_cli/helper.py", line 76, in raw_format_output from jsonpath_rw import parse File "/home/nolan/.local/lib/python3.7/site-packages/jsonpath_rw/init.py", line 1, in from .jsonpath import File "/home/nolan/.local/lib/python3.7/site-packages/jsonpath_rw/jsonpath.py", line 4, in from six.moves import xrange ModuleNotFoundError: No module named 'six.moves'; 'six' is not a package

maxandersen commented 5 years ago

hmm - I can't reproduce.

did you run script/setup first to get all the needed dependencies ? and did you run it in venv or some other isolated env ?

ndarilek commented 5 years ago

No, just ran pip install --user ..., with both the package as released on Pip and with the git master. I haven't checked out the repo yet.

Should I not be installing it this way?

maxandersen commented 5 years ago

1) are you sure pip is python3 ? 2) can you show your full command line ? 3) that kind of install should work but if you have something else installed that conflicts pip might end up not doing the right thing. Can you show the full log you get when running pip install ?

maxandersen commented 5 years ago

looked into it a bit more and six.moves comes from https://pypi.org/project/six/ which works from python2.6 and up afaics so its weird if you don't get it installed.

does pip install six help you at all ?

ndarilek commented 5 years ago

Thanks for digging in. I eventually resolved it by pip uninstall six; pip install --user six. Some additional details:

Anyhow, apologies for the noise. I seem to be up and running now.

venosao commented 1 year ago

Hi I have a similar issue, but I do have six and really do not know what else could be. I am getting this full message. Any idea how to fix it?

Print Output: Traceback (most recent call last): File "/Users/olga/.vscode/extensions/xirider.livecode-1.3.10/node_modules/arepl-backend/python/arepl_python_evaluator.py", line 11, in import astunparse File "/Users/olga/.vscode/extensions/xirider.livecode-1.3.10/node_modules/arepl-backend/python/astunparse/init.py", line 3, in from six.moves import cStringIO ModuleNotFoundError: No module named 'six.moves'

GitNether commented 5 months ago

Any updates on this?

I set the path to my python 3.12 in the extension settings accordingly, and six is installed in the python 3.12 environment aswell. Still, I am getting the error.

sagrawal-code commented 3 months ago

Still, I am getting the error.

This helped me:

python3.12 -m pip install --upgrade six