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

installing stacker with python setup.py install fails #757

Open
waleedsamy opened this issue Jul 8, 2020 · 0 comments
Open

installing stacker with python setup.py install fails #757

waleedsamy opened this issue Jul 8, 2020 · 0 comments

Comments

@waleedsamy
Copy link

waleedsamy commented Jul 8, 2020

I use next Dockerfile to install stacker 1.6.0

FROM python:3.6.7

ENV STACKER_VERSION=1.6.0
ENV PYTHONPATH=/stacks
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHON_EGG_CACHE=/tmp/stacker

RUN mkdir -p /stacks && pip install --upgrade pip setuptools
RUN wget -nv https://github.com/cloudtools/stacker/archive/${STACKER_VERSION}.tar.gz \
 && tar --extract --one-top-level -f ${STACKER_VERSION}.tar.gz \
 && rm -rf ${STACKER_VERSION}.tar.gz \
 && cp ${STACKER_VERSION}/stacker-${STACKER_VERSION}/scripts/docker-stacker /bin/docker-stacker \
 && cd ${STACKER_VERSION}/stacker-${STACKER_VERSION} \
 && python setup.py install \
 && rm -rf $PWD

# RUN pip uninstall -y pyyaml
# RUN pip install pyyaml
RUN stacker --version
WORKDIR /stacks
ENTRYPOINT ["docker-stacker"]
CMD ["-h"]

I got this error

Traceback (most recent call last):
  File "/usr/local/bin/stacker", line 4, in <module>
    __import__('pkg_resources').run_script('stacker==1.6.0', 'stacker')
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1471, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python3.6/site-packages/stacker-1.6.0-py3.6.egg/EGG-INFO/scripts/stacker", line 4, in <module>
    __import__('pkg_resources').run_script('stacker==1.6.0', 'stacker')
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/local/lib/python3.6/site-packages/stacker-1.6.0-py3.6.egg/stacker/commands/__init__.py", line 4, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/local/lib/python3.6/site-packages/stacker-1.6.0-py3.6.egg/stacker/commands/stacker/__init__.py", line 6, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/local/lib/python3.6/site-packages/stacker-1.6.0-py3.6.egg/stacker/commands/stacker/build.py", line 13, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/local/lib/python3.6/site-packages/stacker-1.6.0-py3.6.egg/stacker/actions/build.py", line 6, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/local/lib/python3.6/site-packages/stacker-1.6.0-py3.6.egg/stacker/actions/base.py", line 11, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/local/lib/python3.6/site-packages/stacker-1.6.0-py3.6.egg/stacker/plan.py", line 11, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/local/lib/python3.6/site-packages/stacker-1.6.0-py3.6.egg/stacker/util.py", line 25, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/local/lib/python3.6/site-packages/PyYAML-5.3.1-py3.6-linux-x86_64.egg/yaml/__init__.py", line 13, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/local/lib/python3.6/site-packages/PyYAML-5.3.1-py3.6-linux-x86_64.egg/yaml/cyaml.py", line 7, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/local/lib/python3.6/site-packages/PyYAML-5.3.1-py3.6-linux-x86_64.egg/_yaml.py", line 8, in <module>
  File "/usr/local/lib/python3.6/site-packages/PyYAML-5.3.1-py3.6-linux-x86_64.egg/_yaml.py", line 7, in __bootstrap__
TypeError: exec_module() missing 1 required positional argument: 'module'

To fix it, I had to uninstall pyyaml and reinstall it again.

@waleedsamy waleedsamy changed the title PyYAML 5.3.1 broke stacker installing stacker with python setup.py install fails Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant