安装pinax(0.9a)包含要求的不同选项有哪些?

时间:2012-11-02 21:31:41

标签: python django eclipse pinax

我尝试使用pip install Pinax的经典方法,然后安装需求base.txt,但这不起作用?

安装工作pinax(0.9)基础项目包含要求的其他选项有哪些?

更新

这是以“正确”的方式安装它的例外......

Created project mysite
Installing project requirements...
Traceback (most recent call last):
  File "C:\Users\Desktop\Django\lol\mysite-env\Scripts\pinax-admin-script
.py", line 8, in <module>
    load_entry_point('Pinax==0.9a2', 'console_scripts', 'pinax-admin')()
  File "C:\Users\Desktop\Django\lol\mysite-env\lib\site-packages\pinax\co
re\management\__init__.py", line 105, in execute_from_command_line
    runner.execute()
  File "C:\Users\Desktop\Django\lol\mysite-env\lib\site-packages\pinax\co
re\management\__init__.py", line 94, in execute
    self.loader.load(command).run_from_argv(argv)
  File "C:\Users\Desktop\Django\lol\mysite-env\lib\site-packages\pinax\co
re\management\base.py", line 45, in run_from_argv
    self.handle(*args, **options.__dict__)
  File "C:\Users\Desktop\Django\lol\mysite-env\lib\site-packages\pinax\co
re\management\commands\setup_project.py", line 66, in handle
    self.setup_project(args[0], options["base"], options)
  File "C:\Users\Desktop\Django\lol\mysite-env\lib\site-packages\pinax\co
re\management\commands\setup_project.py", line 134, in setup_project
    installer.install_reqs(not options["allow_no_virtualenv"])
  File "C:\Users\Desktop\Django\lol\mysite-env\lib\site-packages\pinax\co
re\management\commands\setup_project.py", line 207, in install_reqs
    pip.call_subprocess([
AttributeError: 'module' object has no attribute 'call_subprocess'

3 个答案:

答案 0 :(得分:5)

你不再安装Pinax了。

在Django的项目模板之前,Pinax通过捆绑的已启动项目提供了此功能。

现在要获得pinax启动项目,您可以执行以下操作:

pip install Django
django-admin.py startproject --template=https://github.com/pinax/pinax-project-account/zipball/master <project_name>

答案 1 :(得分:1)

请参阅this existing question。根据{{​​3}},这是由于更新版本的pip。所以你需要将pip.call_subprocess更改为pip.util.call_subprocess到你的virtualenv_project / lib / site-packages / pinax / core / management / commands / setup_project.py

答案 2 :(得分:0)

您可以使用Pip或手动下载和解包Pinax。

$ virtualenv mysite-env
$ source mysite-env/bin/activate
(mysite-env)$ pip install Pinax

OR

您可以从pypi下载项目并手动安装。

可能会出现错误,因为您有新版本的Pip。功能pip.call_subprocess已移至pip.util.call_subprocess。见:https://github.com/pypa/pip/pull/464。在执行pinax-admin之前,只需替换C:\virtualenvs\mysite\lib\site-packages\pinax\core\management\commands\setup_project.py中的字符串;例如,(mysite-env)$ pinax-admin setup_project mysite