kislyuk / yq

Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
https://kislyuk.github.io/yq/
Apache License 2.0
2.57k stars 82 forks source link

cannot work with yq #127

Closed Dorsosiv closed 3 years ago

Dorsosiv commented 3 years ago

Hi, I have an Ubuntu computer with python Python 3.8.10 and pip3 pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

I installed the yq pip package with the command pip3 install yq

As you can see it is already installed.

pip3 install yq
Requirement already satisfied: yq in ./.local/lib/python3.8/site-packages (2.12.2)
Requirement already satisfied: PyYAML>=3.11 in /usr/lib/python3/dist-packages (from yq) (5.3.1)
Requirement already satisfied: xmltodict>=0.11.0 in /usr/lib/python3/dist-packages (from yq) (0.12.0)
Requirement already satisfied: argcomplete>=1.8.1 in /usr/lib/python3/dist-packages (from yq) (1.8.1)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from yq) (45.2.0)
Requirement already satisfied: toml>=0.10.0 in ./.local/lib/python3.8/site-packages (from yq) (0.10.2)

pip3 list | grep yq
yq                                               2.12.2  

Yet when I try to use it :

$ yq --help

Command 'yq' not found, but can be installed with:

sudo snap install yq

when I go to the directory of the package in ~/.local/lib/python3.8/site-packages/yq all the files are here.

What do I need to do to make yq run the main.py in the package directory ? To create for it an alias ? (for now that is what I will do ) Waiting for your respond.

Thanks in advance :)

kislyuk commented 3 years ago

You have to add ~/.local/bin to your $PATH.