<p>我对wagtail设置做了一些测试。我在一个新的ubuntu14安装中进行了每个测试(每个测试都在<a href="https://c9.io" rel="nofollow noreferrer">Cloud9 IDE</a>上的新工作区中)。在</p>
<p>测试1:Straight python 2.7</p>
<pre><code>sudo pip install wagtail
ERRO: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
</code></pre>
<p>注释:输出了大量<code>x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/libImaging/codec_fd.o: No such file or directory</code>错误。
没用。在</p>
<p>测试2-使用virtualenv的python2.7</p>
^{pr2}$
<p>现在从他们的github <a href="https://github.com/wagtail/wagtail" rel="nofollow noreferrer">https://github.com/wagtail/wagtail</a></p>
<pre><code>pip install wagtail
out: Successfully installed Django-1.10.7 Pillow-4.1.1 Unidecode-0.4.20 Willow-0.4 beautifulsoup4-4.5.3 django-modelcluster-3.1 django-taggit-0.22.1 django-treebeard-4.1.0 djangorestframework-3.6.2 html5lib-0.999999999 olefile-0.44 pytz-2017.2 requests-2.13.0 wagtail-1.9.1 webencodings-0.5.1
wagtail start mysite
cd mysite
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
</code></pre>
<p>我不得不编辑设置/开发人员包括<code>ALLOWED_HOSTS = ['*']</code>,因为我在云9上。在runserver之后还需要$IP:$PORT。工作!在</p>
<p>Test3-使用virtualenv的python3.4</p>
<pre><code>sudo pip3 install virtualenv
virtualenv -p python3 env
source env/bin/activate
pip install wagtail
Successfully installed Django-1.10.7 Pillow-4.1.1 Unidecode-0.4.20 Willow-0.4 beautifulsoup4-4.5.3 django-modelcluster-3.1 django-taggit-0.22.1 django-treebeard-4.1.0 djangorestframework-3.6.2 html5lib-0.999999999 olefile-0.44 pytz-2017.2 requests-2.13.0 wagtail-1.9.1 webencodings-0.5.1
</code></pre>
<p>命令的其余部分相同。而且成功了!在</p>
<p>测试4-python3.4没有virtualenv</p>
<pre><code>sudo pip3 install wagtail
out: Successfully installed wagtail django-taggit requests Unidecode Django djangorestframework Pillow beautifulsoup4 Willow django-modelcluster django-treebeard olefile pytz
wagtail start mysite
python3 manage.py migrate
python3 manage.py createsuperuser
python3 manage.py runserver
</code></pre>
<p>编辑:犯了个错误。应该用python3运行,而不是python。又做了一次而且成功了!在</p>
<p>结论:看来你需要一个virtualenv才能在ubuntu14和python2上运行。有了python3,它可以使用virtualenv,也可以不使用virtualenv。我不能重复你的错误,但想法是一样的:它不起作用,因为它在错误的地方寻找东西。在</p>
<p>点评:您提到的两件事我无法测试:</p>
<blockquote>
<p>I have been trying to get wagtail to work with my existing Django
application</p>
</blockquote>
<p>有了这么多重的依赖性(枕头、Django rest、beatifullsoup和其他我从未听说过的东西),如果它能在之前的设置中开箱即用,那就太奇怪了。我是说,Django是wagtail的附属品。所以我会换一种方式。重新开始使用wagtail并将代码移植到那里(为了社区起见,使用python3)。对我来说,最坏的还是抄袭我的程序文件。这看起来像是版本问题。试着发布所有相关内容的版本,以及重现问题的确切步骤。我是说,你在django运行的操作系统中安装了wagtail吗?在</p>
<blockquote>
<p>I was having and uWSGI started.</p>
</blockquote>
<p>你已经部署了你的应用了?这使事情复杂化了。如果版本和virtualenv不能解决您的问题,社区需要deploy的设置细节。你还没有提到你的操作系统。在</p>
<p>我希望这有帮助!祝你好运!在</p>