I'm trying to use Travis CI to run tests of my Python code.
My project needs dbus module and it's not available in PyPi, so I have to install it via apt.
Problem is that tests fail with ImportError: No module named 'dbus'. It's quite strange, because I can see in report about successful installation of required packages. Here is my .travis.yml and example of Travis log.
Do I do something wrong?
From the travis log you posted, all your packages are being installed in a virtual environment.
The virtual environment is created in a clean state - so it does not have any links to system libraries, indeed it states so in the documentation:
CI Environment uses separate virtualenv instances for each Python version. System Python is not used and should not be relied on. If you need to install Python packages, do it via pip and not apt.
If you decide to use apt anyway, note that Python system packages only include Python 2.7 libraries on Ubuntu 12.04 LTS. This means that the packages installed from the repositories are not available in other virtualenvs even if you use the –system-site-packages option.
I believe it explains your problem:
python3-
package.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With