cfn-lint --version)cfn-lint 0.10.1
````
*MacOS Version*
-----------------
10.14 (18A391)
*`pip` version*
---------------
07:22 MacOS: ~/ >$ pip --version
pip 18.0 from /Library/Python/2.7/site-packages/pip-18.0-py2.7.egg/pip (python 2.7)
07:22 MacOS: ~/ >$
*Description of issue.*
----------------------
When installing `cfn-lint` on MacOS you might run into an ugly error like so:
06:44 MacOS: infrastructure_as_code/ >$ sudo pip install cfn-lint
The directory '/Users/robert/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/robert/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting cfn-lint
Downloading https://files.pythonhosted.org/packages/98/c2/8fb54d3792cbf3d6214a292a30cb0478803d4aabac378ce4685e73bcfdac/cfn_lint-0.10.1-py2.py3-none-any.whl (1.4MB)
100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 1.4MB 10.7MB/s
Requirement already satisfied: pyyaml in /Library/Python/2.7/site-packages (from cfn-lint) (3.13)
Collecting jsonschema~=2.6 (from cfn-lint)
Downloading https://files.pythonhosted.org/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl
Collecting jsonpatch (from cfn-lint)
Downloading https://files.pythonhosted.org/packages/a0/e6/d50d526ae2218b765ddbdb2dda14d65e19f501ce07410b375bc43ad20b7a/jsonpatch-1.23-py2.py3-none-any.whl
Requirement already satisfied: six~=1.11 in /Library/Python/2.7/site-packages (from cfn-lint) (1.11.0)
Collecting pathlib2>=2.3.0; python_version < "3.4" (from cfn-lint)
Downloading https://files.pythonhosted.org/packages/2a/46/c696dcf1c7aad917b39b875acdc5451975e3a9b4890dca8329983201c97a/pathlib2-2.3.3-py2.py3-none-any.whl
Collecting aws-sam-translator>=1.8.0 (from cfn-lint)
Downloading https://files.pythonhosted.org/packages/48/2a/e74d86153faaafb96a7ee81d8dca66f7aeecf319a7217db30ec9cac88ddf/aws-sam-translator-1.9.0.tar.gz (86kB)
100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 92kB 23.1MB/s
Complete output from command python setup.py egg_info:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
error in aws-sam-translator setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected ',' or end-of-list in enum34~=1.1; python_version<"3.4" at ; python_version<"3.4"
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-install-dU9SSt/aws-sam-translator/
06:44 MacOS: infrastructure_as_code/ >$
````
If this is the case ensure then as pointed out in the following comment you need to upgrade setuptools:
sudo pip install --upgrade setuptools
Just opened this issue for ease of reference for future potential issues.
thanks!
just in case anyone else also fails in this step and the command
sudo pip install --upgrade setuptools
didn't work.
use this command:
pip install --upgrade setuptools --user python
and then it will work :)
Most helpful comment
just in case anyone else also fails in this step and the command
sudo pip install --upgrade setuptoolsdidn't work.
use this command:
pip install --upgrade setuptools --user pythonand then it will work :)