ollionorg / cloudendure-python

A Python 3.7+ client and utilities for CloudEndure
https://2ndWatch.github.io/cloudendure-python/
MIT License
11 stars 10 forks source link

Missing depedency #99

Closed ohmer closed 4 years ago

ohmer commented 4 years ago

Environment

On a up to date Mac, using python3 installed wit Brew, cookiecutter is missing.

uname -a

Darwin rotten.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64

python --version

Python 2.7.16

python3 --version

Python 3.7.6

Symptom

└> pip3 install cloudendure
Collecting cloudendure
  Downloading https://files.pythonhosted.org/packages/e7/3e/526bfddb6c354ab154a8b1d54a1030bf09ae39ca898d4fc4ebf3436ae052/cloudendure-0.1.9-py3-none-any.whl (811kB)
     |████████████████████████████████| 819kB 23.8MB/s
Collecting fire
  Downloading https://files.pythonhosted.org/packages/d9/69/faeaae8687f4de0f5973694d02e9d6c3eb827636a009157352d98de1129e/fire-0.2.1.tar.gz (76kB)
     |████████████████████████████████| 81kB 18.2MB/s
Requirement already satisfied: requests in /usr/local/lib/python3.7/site-packages (from cloudendure) (2.22.0)
Requirement already satisfied: boto3 in /usr/local/lib/python3.7/site-packages (from cloudendure) (1.11.3)
Requirement already satisfied: six in /usr/local/lib/python3.7/site-packages (from fire->cloudendure) (1.12.0)
Collecting termcolor
  Downloading https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/site-packages (from requests->cloudendure) (1.25.6)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests->cloudendure) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests->cloudendure) (2019.6.16)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests->cloudendure) (2.8)
Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in /usr/local/lib/python3.7/site-packages (from boto3->cloudendure) (0.3.0)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python3.7/site-packages (from boto3->cloudendure) (0.9.4)
Requirement already satisfied: botocore<1.15.0,>=1.14.3 in /usr/local/lib/python3.7/site-packages (from boto3->cloudendure) (1.14.3)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/local/lib/python3.7/site-packages (from botocore<1.15.0,>=1.14.3->boto3->cloudendure) (2.8.0)
Requirement already satisfied: docutils<0.16,>=0.10 in /usr/local/lib/python3.7/site-packages (from botocore<1.15.0,>=1.14.3->boto3->cloudendure) (0.15.2)
Building wheels for collected packages: fire, termcolor
  Building wheel for fire (setup.py) ... done
  Created wheel for fire: filename=fire-0.2.1-py2.py3-none-any.whl size=103527 sha256=5e7bd3deda8ab2ca086561f3cf9e1e140e6b881e0d51c3263b6e4200e002798f
  Stored in directory: /Users/ohmer/Library/Caches/pip/wheels/31/9c/c0/07b6dc7faf1844bb4688f46b569efe6cafaa2179c95db821da
  Building wheel for termcolor (setup.py) ... done
  Created wheel for termcolor: filename=termcolor-1.1.0-cp37-none-any.whl size=4832 sha256=e74556863bb03d40b32f2255deebd5ba844ace866d460c66f9b60f90a7c1c2fc
  Stored in directory: /Users/ohmer/Library/Caches/pip/wheels/7c/06/54/bc84598ba1daf8f970247f550b175aaaee85f68b4b0c5ab2c6
Successfully built fire termcolor
Installing collected packages: termcolor, fire, cloudendure
Successfully installed cloudendure-0.1.9 fire-0.2.1 termcolor-1.1.0
┌ohmer@rotten ~/w/c/w/g/cloudendure
└> ce
Traceback (most recent call last):
  File "/usr/local/bin/ce", line 5, in <module>
    from cloudendure.cloudendure import main
  File "/usr/local/lib/python3.7/site-packages/cloudendure/cloudendure.py", line 23, in <module>
    from .templates import TerraformTemplate
  File "/usr/local/lib/python3.7/site-packages/cloudendure/templates.py", line 7, in <module>
    from cookiecutter.main import cookiecutter
ModuleNotFoundError: No module named 'cookiecutter'

Workaround

Install package manually

> pip3 install cookiecutter
Collecting cookiecutter
  Downloading https://files.pythonhosted.org/packages/86/c9/7184edfb0e89abedc37211743d1420810f6b49ae4fa695dfc443c273470d/cookiecutter-1.7.0-py2.py3-none-any.whl (40kB)
     |████████████████████████████████| 40kB 7.9MB/s
Collecting whichcraft>=0.4.0
  Downloading https://files.pythonhosted.org/packages/b5/a2/81887a0dae2e4d2adc70d9a3557fdda969f863ced51cd3c47b587d25bce5/whichcraft-0.6.1-py2.py3-none-any.whl
Collecting jinja2>=2.7
  Downloading https://files.pythonhosted.org/packages/27/24/4f35961e5c669e96f6559760042a55b9bcfcdb82b9bdb3c8753dbe042e35/Jinja2-2.11.1-py2.py3-none-any.whl (126kB)
     |████████████████████████████████| 133kB 35.1MB/s
Collecting future>=0.15.2
  Downloading https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz (829kB)
     |████████████████████████████████| 829kB 48.7MB/s
Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.7/site-packages (from cookiecutter) (7.0)
Collecting binaryornot>=0.2.0
  Downloading https://files.pythonhosted.org/packages/24/7e/f7b6f453e6481d1e233540262ccbfcf89adcd43606f44a028d7f5fae5eb2/binaryornot-0.4.4-py2.py3-none-any.whl
Requirement already satisfied: requests>=2.18.0 in /usr/local/lib/python3.7/site-packages (from cookiecutter) (2.22.0)
Collecting poyo>=0.1.0
  Downloading https://files.pythonhosted.org/packages/42/50/0b0820601bde2eda403f47b9a4a1f270098ed0dd4c00c443d883164bdccc/poyo-0.5.0-py2.py3-none-any.whl
Collecting jinja2-time>=0.1.0
  Downloading https://files.pythonhosted.org/packages/6a/a1/d44fa38306ffa34a7e1af09632b158e13ec89670ce491f8a15af3ebcb4e4/jinja2_time-0.2.0-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23
  Using cached https://files.pythonhosted.org/packages/ce/c6/f000f1af136ef74e4a95e33785921c73595c5390403f102e9b231b065b7a/MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl
Requirement already satisfied: chardet>=3.0.2 in /usr/local/lib/python3.7/site-packages (from binaryornot>=0.2.0->cookiecutter) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests>=2.18.0->cookiecutter) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/site-packages (from requests>=2.18.0->cookiecutter) (1.25.6)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests>=2.18.0->cookiecutter) (2019.6.16)
Collecting arrow
  Downloading https://files.pythonhosted.org/packages/92/fa/f84896dede5decf284e6922134bf03fd26c90870bbf8015f4e8ee2a07bcc/arrow-0.15.5-py2.py3-none-any.whl (46kB)
     |████████████████████████████████| 51kB 20.8MB/s
Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/site-packages (from arrow->jinja2-time>=0.1.0->cookiecutter) (2.8.0)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/site-packages (from python-dateutil->arrow->jinja2-time>=0.1.0->cookiecutter) (1.12.0)
Building wheels for collected packages: future
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.2-cp37-none-any.whl size=491057 sha256=487edebec6e82f91b8a59cd5460b74ac75f288bb9a7c013f595cbd1338cf7445
  Stored in directory: /Users/ohmer/Library/Caches/pip/wheels/8b/99/a0/81daf51dcd359a9377b110a8a886b3895921802d2fc1b2397e
Successfully built future
Installing collected packages: whichcraft, MarkupSafe, jinja2, future, binaryornot, poyo, arrow, jinja2-time, cookiecutter
Successfully installed MarkupSafe-1.1.1 arrow-0.15.5 binaryornot-0.4.4 cookiecutter-1.7.0 future-0.18.2 jinja2-2.11.1 jinja2-time-0.2.0 poyo-0.5.0 whichcraft-0.6.1
┌ohmer@rotten ~/w/c/w/g/cloudendure
└> ce
No CloudEndure YAML configuration found! Creating it at: (%s) /Users/ohmer/.cloudendure.yaml
You must configure your authentication credentials!
Failed to authenticate with CloudEndure! Please check your credentials and try again!

Fix

Not a Python expert, but I guess there is something wrong with the setup.py. The dependency is well declared in the Pipfile and cookiecutter was not missing when I installed via pipenv.

mbeacom commented 4 years ago

@ohmer Thank you for reporting the issue! We are in the process of migrating the project to Poetry to replace the existing pipenv/setup.py mashup.

The bug should now be resolved. Let us know if you have any other questions.