简体   繁体   中英

Installing VTK with conda in travis

I am actually working on using TRAVIS.CI for my python project. It depends on VTK and I rely on conda to install my packages.

In .travis.yml, I explicitly install VTK using conda while creating a testing environment and I verify it is well installed using conda list command and also a python -c "import vtk; print(vtk.VTK_VERSION)" . Everything seems good as import causes no exception and the version is the current anaconda version (6.3.0).

However, during testing with pytest, import of the VTK module fails.

Here you can see the results in travis CI:

https://travis-ci.org/LHEEA/meshmagick/builds/188890953

and my .travis.yml configuration:

https://travis-ci.org/LHEEA/meshmagick/jobs/188890954/config

Numpy is also a dependency and is installed and does not seem to cause problem at import time while pytesting...

Any clue about this would be very appreciated !

Ok I discovered the problem !

I had to install pytest with conda too as the version present on travis did not match my conda environment and surely provoque the use of the python install from travis and not my conda environment so vtk was not installed in that context.

Hoping it could help others.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM