今天我试着在我的Raspberry pi上安装django CMS一段时间,但是它不起作用。我安装了一个新的"RASPBIAN STRETCH LITE“,然后通过ssh连接输入了以下命令:
sudo wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo pip install Django==1.10
sudo pip install virtualenv
cd /srv
sudo mkdir django_cms
cd django_cms
sudo virtualenv env
source env/bin/activate
sudo pip install --upgrade pip
sudo pip install djangocms-installer
sudo mkdir django_site
cd django_site/
sudo djangocms -f -p . web_site所有这些都遵循这个guide
在执行上面的最后一条命令后抛出这个错误:
Creating the project
Please wait while I install dependencies
ERROR: cmd : [u'pip', u'install', u'-q', u'django-cms>=3.5,<3.6', u'djangocms-admin-style>=1.2,<1.3', u'django-treebeard>=4.0,<5.0', u'https://github.com/divio/djangocms-text-ckeditor/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-file/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-link/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-style/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-googlemap/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-snippet/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-picture/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-video/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-column/archive/master.zip?1520455195.14', u'easy_thumbnails', u'django-filer>=1.3', u'Django<2.0', u'pytz', u'django-classy-tags>=0.7', u'html5lib>=0.999999,<0.99999999', u'Pillow>=3.0', u'django-sekizai>=0.9', u'six'] :Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-FFzxtb/Pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-CPB18v-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-FFzxtb/Pillow/
The installation has failed.
*****************************************************************
Check documentation at https://djangocms-installer.readthedocs.io
*****************************************************************
Traceback (most recent call last):
File "/usr/local/bin/djangocms", line 11, in <module>
sys.exit(execute())
File "/usr/local/lib/python2.7/dist-packages/djangocms_installer/main.py", line 33, in execute
verbose=config_data.verbose
File "/usr/local/lib/python2.7/dist-packages/djangocms_installer/install/__init__.py", line 95, in requirements
output = subprocess.check_output(['pip'] + args, stderr=subprocess.STDOUT)
File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '[u'pip', u'install', u'-q', u'django-cms>=3.5,<3.6', u'djangocms-admin-style>=1.2,<1.3', u'django-treebeard>=4.0,<5.0', u'https://github.com/divio/djangocms-text-ckeditor/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-file/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-link/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-style/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-googlemap/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-snippet/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-picture/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-video/archive/master.zip?1520455195.14', u'https://github.com/divio/djangocms-column/archive/master.zip?1520455195.14', u'easy_thumbnails', u'django-filer>=1.3', u'Django<2.0', u'pytz', u'django-classy-tags>=0.7', u'html5lib>=0.999999,<0.99999999', u'Pillow>=3.0', u'django-sekizai>=0.9', u'six']' returned non-zero exit status 1你们有没有解决这个问题的办法?
(我的Python版本: 2.7.13)
发布于 2018-03-08 07:15:45
看起来是Pillow安装失败了。您需要首先安装python开发库。
# Python 2
sudo apt-get install python-dev python-setuptools
# Python 3
sudo apt-get install python3-dev python3-setuptools您还必须安装其他一些必备组件。Pillow文档给出了Ubuntu 14.04的以下先决条件。我不确定Raspian Stretch的等价物是什么
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev \
tcl8.6-dev tk8.6-dev python-tk有关详细信息,请参阅Pillow docs。
既然您正在开始一个新项目,请允许我鼓励您使用Python3!
我会尝试让Pillow自己安装,而不是运行Django CMS安装程序。如果它失败了,那么错误消息应该更明显。
pip install Pillow如果最新版本失败,您可以尝试3.0,因为这似乎是Django CMS的最低版本。
pip install 'Pillow==3.0'https://stackoverflow.com/questions/49161006
复制相似问题