pabvenegas / devops-tools

Devops scripts for docker, ansible etc
MIT License
1 stars 1 forks source link

document dev env requirements #10

Open drewkhoury opened 7 years ago

drewkhoury commented 7 years ago

I'm trying to figure out if I should use the version of python that osx came with, and which pip to install, virtualenv, docker etc ... it would be nice to know what you're testing on so I can replicate and not waste time with problems on other versions.

e.g

DrewBook:drew-devops-tools drew$ python --version
Python 2.7.13
DrewBook:drew-devops-tools drew$ devops_tools
Traceback (most recent call last):
  File "/usr/local/bin/devops_tools", line 7, in <module>
    from devopstools import main
  File "/usr/local/lib/python2.7/site-packages/devopstools/__init__.py", line 10, in <module>
    import devopstools.docker_cli
  File "/usr/local/lib/python2.7/site-packages/devopstools/docker_cli.py", line 9, in <module>
    from docker.client import Client
ImportError: cannot import name Client

or

DrewBook:devops-tools drew$ pip install devops_tools
Requirement already satisfied: devops_tools in /usr/local/lib/python2.7/site-packages
Requirement already satisfied: dockerpty in /usr/local/lib/python2.7/site-packages (from devops_tools)
Requirement already satisfied: docker-py in /usr/local/lib/python2.7/site-packages (from devops_tools)
Requirement already satisfied: PyYAML in /usr/local/lib/python2.7/site-packages (from devops_tools)
Requirement already satisfied: six>=1.3.0 in /usr/local/lib/python2.7/site-packages (from dockerpty->devops_tools)
Requirement already satisfied: docker-pycreds>=0.2.1 in /usr/local/lib/python2.7/site-packages (from docker-py->devops_tools)
Requirement already satisfied: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/local/lib/python2.7/site-packages (from docker-py->devops_tools)
Requirement already satisfied: ipaddress>=1.0.16; python_version < "3.3" in /usr/local/lib/python2.7/site-packages (from docker-py->devops_tools)
Requirement already satisfied: requests!=2.11.0,>=2.5.2 in /usr/local/lib/python2.7/site-packages (from docker-py->devops_tools)
Requirement already satisfied: websocket-client>=0.32.0 in /usr/local/lib/python2.7/site-packages (from docker-py->devops_tools)
DrewBook:devops-tools drew$ devops_tools
Traceback (most recent call last):
  File "/usr/local/bin/devops_tools", line 7, in <module>
    from devopstools import main
  File "/usr/local/lib/python2.7/site-packages/devopstools/__init__.py", line 10, in <module>
    import devopstools.docker_cli
  File "/usr/local/lib/python2.7/site-packages/devopstools/docker_cli.py", line 9, in <module>
    from docker.client import Client
ImportError: cannot import name Client
DrewBook:devops-tools drew$ python --version
Python 2.7.13
drewkhoury commented 7 years ago

note osx python /usr/bin/python /System/Library/Frameworks/Python.framework/Python Python 2.7.10

... so not sure if my brew install python is doing something weird

pabvenegas commented 7 years ago

I am running python 2.7.10 can you try running inside a virtualenv to see if makes a difference

virtualenv venv

source venv/bin/activate

(venv)...$ pip install devops-tools