我正试图用我的django项目第一次设置travis-ci,我在travis
输出中得到了这个跟踪......
0.17s$ python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 13, in <module>
execute_from_command_line(sys.argv)
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/core/management/__init__.py", line 316, in execute
settings.INSTALLED_APPS
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
self._setup(name)
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/conf/__init__.py", line 97, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/opt/python/2.7.9/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named py
The command "python manage.py migrate" exited with 1.
现在我可以看到它正在寻找一个名为py
的模块,而不是运行manage.py
文件,但我不明白为什么会发生这种情况,而且我在网上发现了许多资源声明在travi.yml文件中运行这样的命令(继承人之一:https://gist.github.com/ndarville/3625246)
这是我的travis.yml文件:
script:
- python manage.py migrate
- python manage.py test
现在,在我开始尝试通过安装另一个模块tox
或nose
来运行它之前,我想知道是否有可能这样做,为什么以及为什么它是失败以及在哪里找到文档中的信息...谢谢