Travis CI python imports do not work -
on project, have issues test scripts on travis ci. installed packages needed using conda, , ran test scripts. build fails because of import errors. how can fix this?
my travis yaml file such:
language: python python: - "2.7" - "3.4" - "nightly" # command install dependencies # setup anaconda before_install: - wget http://repo.continuum.io/miniconda/miniconda-latest-linux-x86_64.sh -o miniconda.sh - chmod +x miniconda.sh - bash miniconda.sh -b -p $home/miniconda - export path="$home/miniconda/bin:$path" - conda update -y conda # install packages install: - conda install -y numpy scipy matplotlib networkx biopython - echo $path - python # command run tests script: py.test
one of test scripts requires biopython, , test script fails because cannot find biopython.
__________________ error collecting test_genotype_network.py ___________________ test_genotype_network.py:1: in <module> import genotype_network gn genotype_network.py:1: in <module> bio import seqio e importerror: no module named 'bio'
is there way fix this?
turns out problem py.test
- didn't install in conda
environment. adding pytest
packages install when creating new environment made import errors go away.
Comments
Post a Comment