FAQ
Just so that it doesn't stay unanswered here, it's also been created and
resolved under this issue: https://github.com/ansible/tower-cli/issues/41

Basically python version in OSX 10.10.2 (python 2.7.7) is what causes this
problem. Python update or downgrade fixes it.


Regards,
Daniel

On Wednesday, March 4, 2015 at 5:02:49 PM UTC, JuanJose Vidañez wrote:

Hello all,
I'm trying to use the tower-cli on OSx and I'm getting the following error:

*➜ **~ * sudo pip install ansible-tower-cli

The directory '/Users/jvidanez/Library/Logs/pip' or its parent directory
is not owned by the current user and the debug log has been disabled.
Please check the permissions and owner of that directory. If executing pip
with sudo, you may want the -H flag.

The directory '/Users/jvidanez/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 the -H flag.

The directory '/Users/jvidanez/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 the -H flag.

Collecting ansible-tower-cli

Downloading ansible-tower-cli-2.1.0.tar.gz

Requirement already satisfied (use --upgrade to upgrade): click>=2.1 in
/Library/Python/2.7/site-packages (from ansible-tower-cli)

Requirement already satisfied (use --upgrade to upgrade): colorama>=0.3.1
in /Library/Python/2.7/site-packages (from ansible-tower-cli)

Requirement already satisfied (use --upgrade to upgrade):
dict.sorted==1.0.0 in /Library/Python/2.7/site-packages (from
ansible-tower-cli)

Requirement already satisfied (use --upgrade to upgrade): requests>=2.3.0
in /Library/Python/2.7/site-packages (from ansible-tower-cli)

Requirement already satisfied (use --upgrade to upgrade): six>=1.7.2 in
/Library/Python/2.7/site-packages (from ansible-tower-cli)

Installing collected packages: ansible-tower-cli

Running setup.py install for ansible-tower-cli

changing mode of build/scripts-2.7/tower-cli from 644 to 755

changing mode of /usr/local/bin/tower-cli to 755

Successfully installed ansible-tower-cli-2.1.0

*➜ **~ * tower-cli

Traceback (most recent call last):

File "/usr/local/bin/tower-cli", line 80, in <module>

cli()

File "/Library/Python/2.7/site-packages/click/core.py", line 610, in
__call__

return self.main(*args, **kwargs)

File "/Library/Python/2.7/site-packages/click/core.py", line 589, in main

with self.make_context(prog_name, args, **extra) as ctx:

File "/Library/Python/2.7/site-packages/click/core.py", line 506, in
make_context

self.parse_args(ctx, args)

File "/Library/Python/2.7/site-packages/click/core.py", line 896, in
parse_args

echo(ctx.get_help())

File "/Library/Python/2.7/site-packages/click/core.py", line 368, in
get_help

return self.command.get_help(self)

File "/Library/Python/2.7/site-packages/click/core.py", line 717, in
get_help

self.format_help(ctx, formatter)

File "/Library/Python/2.7/site-packages/click/core.py", line 732, in
format_help

self.format_options(ctx, formatter)

File "/Library/Python/2.7/site-packages/click/core.py", line 837, in
format_options

self.format_commands(ctx, formatter)

File "/Library/Python/2.7/site-packages/click/core.py", line 881, in
format_commands

for subcommand in self.list_commands(ctx):

File "/usr/local/bin/tower-cli", line 45, in list_commands

res = tower_cli.get_resource(filename[:-3])

File "/Library/Python/2.7/site-packages/tower_cli/__init__.py", line 32,
in get_resource

module = importlib.import_module('tower_cli.resources.%s' % name)

File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
line 37, in import_module

__import__(name)

File
"/Library/Python/2.7/site-packages/tower_cli/resources/credential.py", line
18, in <module>

from tower_cli import models

File "/Library/Python/2.7/site-packages/tower_cli/models/__init__.py",
line 18, in <module>

from tower_cli.models.base import BaseResource, Resource,
MonitorableResource

File "/Library/Python/2.7/site-packages/tower_cli/models/base.py", line
125, in <module>

class BaseResource(six.with_metaclass(ResourceMeta)):

File
"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.py",
line 566, in with_metaclass

return meta("NewBase", bases, {})

File "/Library/Python/2.7/site-packages/tower_cli/models/base.py", line
112, in __new__

raise TypeError('Resource subclasses must have an `endpoint`.')

TypeError: Resource subclasses must have an `endpoint`.

*➜ * *~ *


*Any suggestions?*
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2527ba5f-0a15-45e6-b0d1-f5b41b58e475%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupansible-project @
postedMar 4, '15 at 5:02p
activeMar 9, '15 at 2:31p
posts2
users2

People

Translate

site design / logo © 2021 Grokbase