Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install ansible (OSX) #56

Closed
erikcw opened this issue Aug 7, 2015 · 12 comments
Closed

Cannot install ansible (OSX) #56

erikcw opened this issue Aug 7, 2015 · 12 comments
Labels

Comments

@erikcw
Copy link

erikcw commented Aug 7, 2015

Looks like pipsi isn't finding the ansible scripts.


✗ pipsi install ansible
New python executable in /Users/erik/.local/venvs/ansible/bin/python2.7
Also creating executable in /Users/erik/.local/venvs/ansible/bin/python
Installing setuptools, pip, wheel...done.
Collecting ansible
Collecting paramiko (from ansible)
  Using cached paramiko-1.15.2-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/site-packages (from ansible)
Collecting PyYAML (from ansible)
Collecting pycrypto>=2.6 (from ansible)
Collecting jinja2 (from ansible)
  Using cached Jinja2-2.8-py2.py3-none-any.whl
Collecting ecdsa>=0.11 (from paramiko->ansible)
  Using cached ecdsa-0.13-py2.py3-none-any.whl
Collecting MarkupSafe (from jinja2->ansible)
Installing collected packages: ecdsa, pycrypto, paramiko, PyYAML, MarkupSafe, jinja2, ansible
Successfully installed MarkupSafe-0.23 PyYAML-3.11 ansible-1.9.2 ecdsa-0.13 jinja2-2.8 paramiko-1.15.2 pycrypto-2.6.1
Did not find any scripts.  Uninstalling.✗ pipsi install ansible
New python executable in /Users/erik/.local/venvs/ansible/bin/python2.7
Also creating executable in /Users/erik/.local/venvs/ansible/bin/python
Installing setuptools, pip, wheel...done.
Collecting ansible
Collecting paramiko (from ansible)
  Using cached paramiko-1.15.2-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/site-packages (from ansible)
Collecting PyYAML (from ansible)
Collecting pycrypto>=2.6 (from ansible)
Collecting jinja2 (from ansible)
  Using cached Jinja2-2.8-py2.py3-none-any.whl
Collecting ecdsa>=0.11 (from paramiko->ansible)
  Using cached ecdsa-0.13-py2.py3-none-any.whl
Collecting MarkupSafe (from jinja2->ansible)
Installing collected packages: ecdsa, pycrypto, paramiko, PyYAML, MarkupSafe, jinja2, ansible
Successfully installed MarkupSafe-0.23 PyYAML-3.11 ansible-1.9.2 ecdsa-0.13 jinja2-2.8 paramiko-1.15.2 pycrypto-2.6.1
Did not find any scripts.  Uninstalling.
@RonnyPfannschmidt
Copy link
Contributor

should work on master

also note than ansible is a total mess :)

@erikcw
Copy link
Author

erikcw commented Aug 11, 2015

It would be helpful to have an option for pipsi install that would prevent it from uninstalling if it can't find any scripts. Maybe print out a big warning message if that happens with instructions on how to manually create the symlinks. Kind of like how homebrew guides similar issues with brew install.

I imaging there are a lot of projects that are "a total mess"... :-)

@RonnyPfannschmidt
Copy link
Contributor

can you make that a separate issue?

@untitaker
Copy link
Collaborator

@erikcw Does ansible work now?

@erikcw
Copy link
Author

erikcw commented Aug 12, 2015

@untitaker Just tested it with pipsi 0.9. It now installs and runs. However, it requires boto for many of the AWS related functions.

ansible -m setup 52.3.1.188
ERROR: Inventory script (/etc/ansible/hosts) had an execution error: Traceback (most recent call last):
  File "/etc/ansible/hosts", line 121, in <module>
    import boto
ImportError: No module named boto

I tried installing boto inside of the ansible virtualenv, but that doesn't seem to help since /etc/ansible/hosts doesn't seem to be run from within the virtualenv context.

@RonnyPfannschmidt
Copy link
Contributor

Change the shebang of the hosts script?

@untitaker
Copy link
Collaborator

I'm not familiar with ansible: Is that hosts script generated by the ansible installation done by pipsi? I suppose this is more of an issue with ansible than pipsi.

@erikcw
Copy link
Author

erikcw commented Aug 13, 2015

@RonnyPfannschmidt's suggestion worked. Changed the shebang from #!/usr/bin/env python to #!/Users/erik/.local/venvs/ansible/bin/python

@erikcw erikcw closed this as completed Aug 13, 2015
@untitaker
Copy link
Collaborator

Huh, I misread that... I wonder why /usr/bin/env chose the wrong Python. It does work fine in venvs for me.

@erikcw
Copy link
Author

erikcw commented Aug 13, 2015

My guess is that the script is being executed outside of the context of the virtualenv. Maybe by subprocess?

@RonnyPfannschmidt
Copy link
Contributor

@erikcw usually that works fine, i suspect env on OSXis doing someting unexpected

@vankhoa011
Copy link

same problem.

➜  docker-remove-images  pipsi install docker-py
Running virtualenv with interpreter /Users/khoanguyen/.local/venvs/pipsi/bin/python
Using real prefix '/System/Library/Frameworks/Python.framework/Versions/2.7'
New python executable in /Users/khoanguyen/.local/venvs/docker-py/bin/python
Installing setuptools, pip, wheel...done.
Collecting docker-py
Collecting requests>=2.5.2 (from docker-py)
  Using cached requests-2.8.1-py2.py3-none-any.whl
Collecting six>=1.4.0 (from docker-py)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting websocket-client>=0.32.0 (from docker-py)
Installing collected packages: requests, six, websocket-client, docker-py
Successfully installed docker-py-1.5.0 requests-2.8.1 six-1.10.0 websocket-client-0.34.0
Did not find any scripts.  Uninstalling.

pipsi seem installed docker-py successfully . However, I can't import docker module

➜  docker-rmi  docker-rmi
Traceback (most recent call last):
  File "/Users/khoanguyen/.local/bin/docker-rmi", line 9, in <module>
    load_entry_point('docker-rmi==0.1.0', 'console_scripts', 'docker-rmi')()
  File "/Users/khoanguyen/.local/venvs/docker-rmi/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/khoanguyen/.local/venvs/docker-rmi/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/Users/khoanguyen/.local/venvs/docker-rmi/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/Users/khoanguyen/.local/venvs/docker-rmi/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/khoanguyen/repo/docker-remove-images/docker_rmi/cli.py", line 4, in <module>
    from docker import Client
ImportError: No module named docker

No packages which are related docker-py in /Users/khoanguyen/.local/venvs directory

➜  venvs  ls
docker-rmi pipsi      tox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants