# Can't deploy to PyPI anymore: pkg\_resources.ContextualVersionConflict: importlib-metadata 0.18

**URL:** <https://travis-ci.community/t/cant-deploy-to-pypi-anymore-pkg-resources-contextualversionconflict-importlib-metadata-0-18/10494>\
**Category:** Deployment\
**Tags:** bug, pypi\
**Created:** [November 9, 2020, 9:03am UTC](https://travis-ci.community/t/cant-deploy-to-pypi-anymore-pkg-resources-contextualversionconflict-importlib-metadata-0-18/10494 "2020-11-09T09:03:49Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![rmk135](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/rmk135/32/5386_2.png) [@rmk135](https://travis-ci.community/u/rmk135)\
**Post date:** [December 10, 2020, 10:38pm UTC](https://travis-ci.community/t/cant-deploy-to-pypi-anymore-pkg-resources-contextualversionconflict-importlib-metadata-0-18/10494/26 "2020-12-10T22:38:56Z")

</div>

Hey everybody,

I face this issue on .com. Did anyone ported / deployed the fix to .com?

Here is the broken build [https://travis-ci.com/github/ets-labs/python-dependency-injector/jobs/455057934](https://travis-ci.com/github/ets-labs/python-dependency-injector/jobs/455057934). Fails on last command even thus it’s green.

---

<div class="post-metadata">

**Author:** ![rmk135](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/rmk135/32/5386_2.png) [@rmk135](https://travis-ci.community/u/rmk135)\
**Post date:** [December 10, 2020, 11:34pm UTC](https://travis-ci.community/t/cant-deploy-to-pypi-anymore-pkg-resources-contextualversionconflict-importlib-metadata-0-18/10494/27 "2020-12-10T23:34:56Z")

</div>

If anyone still faces the issue and looks for the fix, you can install twine with next options:

`python -m pip install --upgrade --upgrade-strategy eager twine`

As state above, it will will resolve the dependencies proper way.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [December 11, 2020, 10:03pm UTC](https://travis-ci.community/t/cant-deploy-to-pypi-anymore-pkg-resources-contextualversionconflict-importlib-metadata-0-18/10494/28 "2020-12-11T22:03:11Z")

</div>

@rmk135 The fix is for the stock PyPI deployer. You are not using it but rather deploying things yourself.

---

<div class="post-metadata">

**Author:** ![rmk135](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/rmk135/32/5386_2.png) [@rmk135](https://travis-ci.community/u/rmk135)\
**Post date:** [December 11, 2020, 11:45pm UTC](https://travis-ci.community/t/cant-deploy-to-pypi-anymore-pkg-resources-contextualversionconflict-importlib-metadata-0-18/10494/29 "2020-12-11T23:45:39Z")

</div>

@native-api, got it, thanks. So it’s not Travis issue, but more pip / twine / keyring problem, correct?

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [December 12, 2020, 12:14pm UTC](https://travis-ci.community/t/cant-deploy-to-pypi-anymore-pkg-resources-contextualversionconflict-importlib-metadata-0-18/10494/30 "2020-12-12T12:14:14Z")

</div>

@rmk135 Pip problem. It doesn’t properly update a dependency when it’s installed but some of the other packages requires a newer version. Apart from `--upgrade-strategy eager`, using the new resolver may help (with `--use-feature=2020-resolver` or [by using Pip 20.3+](https://github.com/pypa/pip/commit/0d8acc9000471becf97b91b4465777b37bf5e011)).

[Previous page](https://travis-ci.community/t/cant-deploy-to-pypi-anymore-pkg-resources-contextualversionconflict-importlib-metadata-0-18/10494.md?page=1)
