-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Support question : Pipenv is not able to download aws cdk core package #3406
Comments
I too would like to see better support for Pipenv and to be more Pythonic in general. 👍 |
The CDK consists of many individual packages, basically one for each service plus some things like core. Each of these are separate Python modules. So, there is no package called I'm not aware of anything that would preclude the use of pipenv with CDK although the current examples use virtualenv. This is mainly because virtualenv is built into Python 3.6+ and does not require any additional software to be installed. I think it would be useful to provide some pipenv-based examples, as well. If there are specific issues using pipenv I would recommend creating new issues for each one. I agree that the Typescript examples that appear in the README files for Python modules are confusing. We have an existing issue to track this and it is on our roadmap to fix. We aren't able to provide a estimate of when that will happen but I encourage you to up vote the issue. |
@garnaat I just got started on AWS CDK for Python right now and I concur with @vaneek and @olivier-schmitt's opinions: As a python dev, I would have expected a pip-installable I do prefer to have all the CDK-AWS dependencies pre-installed (like other AWS SDKs do: $ cdk ls
Traceback (most recent call last):
File "app.py", line 5, in <module>
from hello.hello_stack import MyStack
File "/Users/romanvg/dev/umccr/infrastructure/cdk/hello/hello_stack.py", line 1, in <module>
from aws_cdk import (
ImportError: cannot import name 'aws_iam' from 'aws_cdk' (unknown location) Instead, I found myself going through the following sequence of commands, fixing the import errors while reading the excellent CDK workshop docs, which don't seem to mention this caveat explicitly: $ pip install aws_cdk.aws_iam
$ pip install aws_cdk.aws_sqs
$ pip install aws_cdk.aws_sns
$ pip install aws_cdk.aws_sns_subscriptions Also, the auto-creation of a virtualenv can potentially clash with third party virtualenv systems like Conda/Anaconda, heavily used in scientific environments: https://www.anaconda.com/ Just my 2 cents as I explore CDK with a "fresh pair of eyes" ;) |
Correction: the aforementioned packages are in |
@garnaat I just found one of the reasons why you might not be providing such an
And that seems to be inconsistent version pinning across ERROR: aws-cdk-cx-api 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-core 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-region-info 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-aws-iam 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-aws-cloudwatch 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-aws-logs 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-aws-ssm 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-aws-ec2 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-aws-route53 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-aws-events 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-assets 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-aws-kms 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible.
ERROR: aws-cdk-aws-s3 1.6.1 has requirement jsii~=0.15.2, but you'll have jsii 0.11.3 which is incompatible. |
How did you resolve this ? |
**Note: for support questions, please first reference our [documentation]
Pipenv is not mentioned in cdk documentation
I'm submitting a ...
What is the current behavior?
If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce
Use the following Pipfile:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
aws-cdk.core="*"
[requires]
python_version = "3.6"
Create a virtual env with "pipenv --python 3.6" then "pipenv install"
The package is not found but if I remove aws-cdk and add for instance botot3 package in the requires section, it works perfectly.
BTW, a "pip install aws-cdk.core" works perfectly too.
So it seems Pipenv does not like the way the package aws-cdk.core is defined or there is a special name to use.
Pipenv finding the package like any package available on pypi.
Please tell us about your environment:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions
Spreading Javascript or Typescript code all over the place in the Python documentation is just incredibly misleading.
I'm a bit disappointing by this because I was used to boto3 experience which such an incredible library and has an incredible documentation.
The text was updated successfully, but these errors were encountered: