ansible / ansible-container

DEPRECATED -- Ansible Container was a tool to build Docker images and orchestrate containers using only Ansible playbooks.
GNU Lesser General Public License v3.0
2.19k stars 394 forks source link

pip install of ansible-container fails if using pip version 10.0.1 #945

Closed pixdrift closed 6 years ago

pixdrift commented 6 years ago
ISSUE TYPE
container.yml
N/A
OS / ENVIRONMENT
OS: CentOS 7.5
Python: 2.7.5
ansible-container: 0.9.2
pip: 10.0.1
SUMMARY

When installing ansible-container from pypi using pip the setup step fails with an import error

# pip install "ansible-container[docker]"
Collecting ansible-container[docker]
  Using cached https://files.pythonhosted.org/packages/bc/2a/b1252de3931173d26a30fc965be33c9cc0044cf7b23ce4c707f55d86830c/ansible-container-0.9.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-FIjLWf/ansible-container/setup.py", line 10, in <module>
        from pip.req import parse_requirements
    ImportError: No module named req
STEPS TO REPRODUCE

1. Ensure pip 10.0.1 is installed 2. Attempt to install ansible-container

# pip install "ansible-container[docker]"

Reverting the pip version to 9.0.1 resolves the issue and ansible-container installs correctly.

EXPECTED RESULTS

ansible-container installs cleanly without error

ACTUAL RESULTS

ansible-container installation fails with an import error.

Voronenko commented 6 years ago

Fixed in scope of https://github.com/ansible/ansible-container/pull/939

Voronenko commented 6 years ago

@pixdrift Workaround would be to downgrade pip to 0.9.3 in your virtualenv, until fixed version will be released to pypi

kbabioch commented 5 years ago

@Voronenko Any timeline / ETA on when a new release will be made?

Voronenko commented 5 years ago

In my opinion hotfix release from develop might be done already.
At a moment maintainers for pypi are: https://pypi.org/project/ansible-container/

@j00bar was about to help with that, once has some time.

morganchristiansson commented 5 years ago

Just got this error too trying to install ansible-conainer.. pip is now at version 18 and you want me to downgrade to 9?

Another workaround is to run version from git:

https://docs.ansible.com/ansible-container/installation.html#running-from-source

Voronenko commented 5 years ago

There are multiple options a) from source, as @morganchristiansson suggested b) virtualenv with downgraded pip https://github.com/softasap/sa-container-bootstrap/blob/master/box-example/alpine-37/Makefile#L32 c) Use other tools like packer https://github.com/softasap/sa-container-bootstrap/blob/master/box-example-packer/alpine-35/container.json d) Publish own forked package on pypi (see https://github.com/ansible/ansible-container/wiki/Publishing-(forked)-package-on-a-pypi) Example: https://pypi.org/project/sa-ansible-container/

I invite interested guys from community to try to reach official pypi package maintainers and invite them to release hotfix version of ansible-container from develop

Pypi maintainers are listed here: https://pypi.org/project/ansible-container/

At a moment, I have possibility only to keep develop in green state.

For own purposes, I am publishing unofficial build https://pypi.org/project/sa-ansible-container/ , based on ansible-container develop.