Build errors installing a common dependency (docopt) on python 3.7 but not other versions

Hi folks,
I am using track my test coverage and my build configuration includes the line:

$ pip install coverage coveralls

This worked normally in the past because it is an unremarkable requirement. Here is a link to a successful build:

I haven’t worked on this project for 3 months. However, as of this week, the same command generates an error when installing docopt (0.6.2), a sub-dependendcy of coveralls. Here is a link to a broken build:

The test that fails is in python 3.7. docopt 0.6.2 was last updated in 2014. Even though the project only lists compatibility through python 3.3, the same configuration does not create errors in python 3.8 or 3.9: Travis CI - Test and Deploy with Confidence
And, like I said, it worked fine in python 3.7 until recently.

None of the versions of the packages have changed. I don’t have any trouble installing docopt locally so I can’t understand where this problem came from. My travis configuration is super simple: core/.travis.yml at master · AntelopeLCA/core · GitHub

Any hints as to what is going on? Thanks in advance.

Hey there,

It seems like there are many version differences between those builds. I have run a diff check [between them (left is failing - right is succeeding), you can see that you have pip version difference that you can recover installation the version 22.0.4 as it was in the last succeeding build.

I hope this would be helpful.

[1] Untitled Diff - Diff Checker

1 Like

Thanks for your reply- I see what you mean, the failing build is using a newer version of pip (22.0.4) and the last successful build used version 20.1. But I don’t install/specify pip, it comes with the container. I didn’t change the container so why would the version of pip change?

Anyway, I am running pip 22.0.4 on my physical machine at home and it installs just fine there, so I am skeptical that that would explain the difference. If you can suggest how to tell travis to install an old version of pip, then I could investigate that.


This should help to downgrade the version of the current pip:

pip install pip==22.0.4


That was a helpful suggestion. I adjusted my travis.yml file to conditionally downgrade pip to the last working version (20.1):

 - if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then pip install pip==20.1; fi

This runs correctly but the job still fails with the same error. It appears to have something to do with the importlib_metadata package-- I tried pip install -U importlib_metadata and that solved it! see: Travis CI - Test and Deploy with Confidence

 - if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then pip install -U importlib_metadata; fi