Python, pinax, django, windows AttributeError: 'module' object has no attribute 'call_subprocess'

强颜欢笑 提交于 2019-12-05 05:28:39

问题


I installed pinax on windows

after trying to create a project I got this error:

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

I would be thankful for any help. By the way I am using python 2.7.3 and the latest stable pinax version


回答1:


You have new version of pip, the function pip.call_subprocess has been moved to pip.util.call_subprocess. See: https://github.com/pypa/pip/pull/464

Just replace the string in

C:\virtualenvs\mysite\lib\site-packages\pinax\core\management\commands\setup_project.py

Before executing the pinax-admin



来源:https://stackoverflow.com/questions/12250317/python-pinax-django-windows-attributeerror-module-object-has-no-attribute

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!