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

ImportError: No module named packaging.version #3316

Closed
ryancampbell opened this issue Jan 23, 2017 · 8 comments
Closed

ImportError: No module named packaging.version #3316

ryancampbell opened this issue Jan 23, 2017 · 8 comments
Labels

Comments

@ryancampbell
Copy link

echo | eb init "acm-risk-alive" -r "us-east-1" -p "64bit Amazon Linux 2016.03 v2.1.3 running Docker 1.11.1" 0s
Traceback (most recent call last):
File "/usr/local/bin/eb", line 5, in
from pkg_resources import load_entry_point
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 70, in
import packaging.version
ImportError: No module named packaging.version

language: node_js
node_js:

  • "5.7.1"

branches:
only:
- master
- staging
- develop

build:
ci:
- nvm use 5.7.1
- echo 'CI is running'
- npm install
- npm install webpack -g
- npm run build
- shippable_retry docker build -t "acm-risk-alive:$BRANCH.$BUILD_NUMBER" .
- docker tag acm-risk-alive:$BRANCH.$BUILD_NUMBER 508647932042.dkr.ecr.us-east-1.amazonaws.com/acm-risk-alive:$BRANCH.$BUILD_NUMBER
- docker push 508647932042.dkr.ecr.us-east-1.amazonaws.com/acm-risk-alive:$BRANCH.$BUILD_NUMBER
- pip install --upgrade botocore

integrations:
deploy:
- integrationName: "acm-aws"
type: aws
target: eb_docker
application_name: "acm-risk-alive"
env_name: "acm-risk-alive-$BRANCH"
bucket_name: "elasticbeanstalk-us-east-1-508647932042"
region: "us-east-1"
image_name: "508647932042.dkr.ecr.us-east-1.amazonaws.com/acm-risk-alive"
image_tag: "$BRANCH.$BUILD_NUMBER"
platform: "64bit Amazon Linux 2016.03 v2.1.3 running Docker 1.11.1"
hub:
- integrationName: "acm-aws-ecr"
type: ecr
region: "us-east-1"

@a-murphy
Copy link

It looks like something is wrong with one of the awsebcli dependencies, causing the awsebcli installation to fail. We have not yet determined which dependency or why it changed.

@ryancampbell
Copy link
Author

@a-murphy thank you, I'll watch for updates.

@a-murphy
Copy link

a-murphy commented Jan 24, 2017

It looks like a new version of setuptools was released and the dependencies of that dependency (packaging and appdirs) are causing the problem. Installing the latest version of setuptools or its dependencies before awsebcli appears to help. So, adding either pip install packaging==16.8 appdirs==1.4.0 or pip install setuptools==34.0.1 to the end of your ci section (after botocore) should allow awsebcli to be installed.

@jwg4
Copy link

jwg4 commented Jan 24, 2017

Does this means that it is expected behavior that pip install -U setuptools should fail, when a version before 34 is currently installed? This seems surprising! Should this be reported as a bug to pip?

@auzias
Copy link

auzias commented Jan 24, 2017

I got the same error by installing an unrelated project but using setuptools with pip3. I'ld cast my vote to report this to pip.
See: PythonOT/POT/issues/4

@avinci
Copy link
Member

avinci commented Jan 24, 2017

closing this from our side as its not a Shippable issue.

@ryancampbell
Copy link
Author

@avinci I agree, not directly a shippable problem

If anyone happens to solve this before I do please share the fix. I'll do the same

nkolytschew added a commit to inspectIT/marketplace that referenced this issue Feb 3, 2017
Create inspectIT marketplace prototype

INSPECTIT-2219
Milestone 3 - Profile

fixing build errors
- see: Shippable/support#3325
- see: Shippable/support#3316
@vshih
Copy link

vshih commented Mar 11, 2017

@a-murphy,

pip install packaging=16.8 appdirs=1.4.0

should be

pip install packaging==16.8 appdirs==1.4.0

which worked for me. pip install setuptools==34.0.1 did not work for me, it failed with the same ImportError as the original issue.

danielcompton added a commit to danielcompton/aws-eb-cli that referenced this issue Apr 11, 2018
Fixes error:

/project # eb
Traceback (most recent call last):
  File "/usr/bin/eb", line 6, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

Suggested in Shippable/support#3316 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants