我想在Linux下的Appveyor上运行我的python项目的测试。
我尝试过不安装毒物。 Here is the appveyor.yml:
# appveyor.yml
---
image:
- Ubuntu
build: off
test_script:
- tox
My build fails。它说:
/opt/appveyor/build-agent/bash-shell.sh: line 62: tox: command not found
[好,让我们先安装毒物... Here is my new appveyor.yml,它基于this guide。 (我刚刚添加了Ubuntu映像。)
# appveyor.yml
---
environment:
matrix:
- TOXENV: py36
image:
- Ubuntu
build: off
install:
- pip install tox
test_script:
- tox
但是,再次build fails。它说:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pyparsing.py'
如何在Ubuntu下的Appveyor上运行tox?
使用sudo
成为root:
sudo pip install tox
或安装在您的$HOME
中:
pip install tox --user
并将~/.local/bin
添加到$PATH
;或直接运行~/.local/bin/tox
。