나는 빌드해야하는 라이브러리를 사용하는 파이썬 프로젝트를 가지고 있습니다. 내가 아나콘다를 사용한다고 가정하면. 나는 여러 파이썬 버전에 대해 테스트 할 수있는 트래비스에 대한 계획을 만들고 싶지 않으며 그렇게 할 수 없다. 여기에 내가 무엇을 가지고 :아나콘다와 트래비스가있는 다중 파이썬 버전
- 내가 여러 파이썬 버전에 대해 그것을 테스트 할 (예 : 2.7, 3.5, 3.6) 내가
requirements.yml
파일이 - 다음과 같이 표시되는 :
channels: - kne dependencies: - numpy - pytest - numpy - scipy - matplotlib - seaborn - pybox2d - pip: - gym - codecov - pytest - pytest-cov
내 .travis.yml
에는 다음이 포함
language: python
# sudo false implies containerized builds
sudo: false
python:
- 3.5
- 3.4
before_install:
# Here we download miniconda and install the dependencies
- export MINICONDA=$HOME/miniconda
- export PATH="$MINICONDA/bin:$PATH"
- hash -r
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -f -p $MINICONDA
- conda config --set always_yes yes
- conda update conda
- conda info -a
- echo "Python version var"
- echo $TRAVIS_PYTHON_VERSION
- conda env create -n testenv -f environment.yml python=$TRAVIS_PYTHON_VERSION
- source activate testenv
install:
- python setup.py install
script:
- python --version
- python -m pytest --cov=.
- codecov
environment.yml
에 파이썬 버전을 넣으면 잘 작동하지만 여러 개의 파이썬 버전을 사용할 수 없습니다. 나에게 그것은 -f
이 제공되면 conda env create
에 대해 나열된 추가 패키지를 무시합니다.
또한 env 생성 후 - conda install -n testenv python=$TRAVIS_PYTHON_VERSION
을 추가해도 작동하지 않습니다.
UnsatisfiableError: The following specifications were found to be in conflict:
- functools32 -> python 2.7.*
- python 3.5*
Use "conda info <package>" to see the dependencies for each package.
나는 그것을하기 위해서 무엇을해야합니까?
// 당신은 자세한 내용을 보려면 싶은 경우는, 여기로 볼 수 있습니다 : https://travis-ci.org/mbednarski/Chiron/jobs/220644726