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.62k stars 84 forks source link

yq does not install. Does not show up on the file system after pip install yq #49

Closed hectoralicea closed 5 years ago

hectoralicea commented 5 years ago

yq will not install. See below

[root@aks-bastion01-poc /]# pip install yq
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting yq
  Using cached https://files.pythonhosted.org/packages/5c/2e/1df0a8163e19d3699fb745d56ff7d4c8fb0cbfe1d123609dc13dff6170b3/yq-2.7.2-py2.py3-none-any.whl
Requirement already satisfied: xmltodict>=0.11.0 in /usr/lib/python2.7/site-packages (from yq) (0.11.0)
Requirement already satisfied: setuptools in /usr/lib/python2.7/site-packages (from yq) (0.9.8)
Collecting PyYAML>=3.11 (from yq)
  Using cached https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz
Installing collected packages: PyYAML, yq
  Found existing installation: PyYAML 3.10
Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
[root@aks-bastion01-poc /]# yq
-bash: yq: command not found
[root@aks-bastion01-poc /]# find . -name yq 
[root@aks-bastion01-poc /]# 
hectoralicea commented 5 years ago

More data:

`[root@aks-bastion01-poc /]# pip install yq --verbose DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Created temporary directory: /tmp/pip-ephem-wheel-cache-v7Dfq7 Created temporary directory: /tmp/pip-req-tracker-UJb8aA Created requirements tracker '/tmp/pip-req-tracker-UJb8aA' Created temporary directory: /tmp/pip-install-KZyOfW Collecting yq 1 location(s) to search for versions of yq:

hectoralicea commented 5 years ago

Found a sequence of steps that worked to get yq installed on CentOS 7. Here you go. Kind of funky, but it works. Came from the following thread. https://github.com/pypa/pip/issues/5247#issuecomment-448953762

` yum -y install epel-release yum -y install python-pip

install jq

wget -nv -O /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 chmod u+rwx,g+rx,o+rx /usr/local/bin/jq jq --version

install pip and yq

pip install --upgrade --force-reinstall pip==9.0.3 #Temporarily downgrade pip to install yq pip install yq --disable-pip-version-check yq --version pip install --upgrade pip #revert pip back to latest version `

kislyuk commented 5 years ago

This looks like it's not a yq error, but a configuration issue with your Python toolchain.

Without specific information about the steps needed to reproduce this issue, I can't help you. Perhaps pip is installing the package executables into a location not on your $PATH. You can check the location of the installed files with pip show -f yq.