gpt4 book ai didi

pip - 创建新的 django-cms 项目时出错

转载 作者:行者123 更新时间:2023-12-05 01:21:22 26 4
gpt4 key购买 nike

我想安装 django-cms,但是当我想用这段代码创建一个新项目时

>>djangocms -p . my_demo

我收到这个错误:

(myLibrary)Mehradads-MacBook-Pro-3:Workspace mehradad$ djangocms -p . my_demo

Database configuration (in URL format) [default sqlite://localhost/project.db]:
django CMS version (choices: 2.4, 3.0, stable, develop) [default stable]:
Django version (choices: 1.4, 1.5, 1.6, stable) [default stable]: 1.5.8
Activate Django I18N / L10N setting (choices: yes, no) [default yes]:
Install and configure reversion support (choices: yes, no) [default yes]:
Languages to enable. Option can be provided multiple times, or as a comma separated list. Only language codes supported by Django can be used here: en
Optional default time zone [default America/Chicago]:
Activate Django timezone support (choices: yes, no) [default yes]:
Activate CMS permission management (choices: yes, no) [default yes]:
Use Twitter Bootstrap Theme (choices: yes, no) [default no]: yes
Use custom template set [default no]:
Load a starting page with examples after installation. Choose "no" if you use a custom template set. (choices: yes, no) [default no]: yes
INFO: Starting new HTTPS connection (1): pypi.python.org

Command /Users/mehradad/Web_project/Workspace/myLibrary/bin/python -c "import setuptools, tokenize;__file__='/Users/mehradad/Web_project/Workspace/myLibrary/build/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/v5/gzrs3m_932x8gfpqc5lt6kh00000gn/T/pip-3JZJJw-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mehradad/Web_project/Workspace/myLibrary/include/site/python2.7 failed with error code 1 in /Users/mehradad/Web_project/Workspace/myLibrary/build/Pillow
Storing debug log for failure in /Users/mehradad/.pip/pip.log
Traceback (most recent call last):
File "/Users/mehradad/Web_project/Workspace/myLibrary/bin/djangocms", line 11, in <module>
sys.exit(execute())
File "/Users/mehradad/Web_project/Workspace/myLibrary/lib/python2.7/site-packages/djangocms_installer/main.py", line 25, in execute
install.requirements(config_data.requirements)
File "/Users/mehradad/Web_project/Workspace/myLibrary/lib/python2.7/site-packages/djangocms_installer/install/__init__.py", line 64, in requirements
raise InstallationError("Error while installing requirements. Check pip log file for error details.")
pip.exceptions.InstallationError: Error while installing requirements. Check pip log file for error details.

我不知道为什么会出现这个错误!我在 max osx 10.8.5 中创建这个项目

谁能帮我解决这个问题!?谢谢

最佳答案

我在 Ubuntu 上运行,所以我的设置有 pip 不同。但基本上我查看了 pip.log 文件 (cat ~/.pip/pip.log),发现我的机器缺少编译所需的文件,所以我不得不这样做:

sudo apt-get update
sudo apt-get install g++
sudo apt-get install python-dev

并且(基于我发现的 on another stackoverflow question ):

sudo apt-get install libjpeg-dev libfreetype6-dev zlib1g-dev
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/
pip uninstall pillow
pip install pillow

由于您使用的是 MacOS,您的情况会有所不同,但希望这会为您指明正确的方向。

关于pip - 创建新的 django-cms 项目时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24185104/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com