Search code examples
pythontravis-cipypi

How to make Travis CI automatically say yes to pip?


If, in my Travis CI build, I want to uninstall a package locally and install the PyPI version, how do I modify the .travis.yml script to automatically say "yes" to the pip uninstall packagename command?

As it stands right now, all I have is:

- pip uninstall packagename #remove local version
- pip install packagename #install the PyPI version

Solution

  • Looking into pip help uninstall you will see that it takes a --yes flag.

    Also you could consider using pip install -U packagename.