2014-04-17 54 views
0

我已經安裝了IPython中我的機器上的虛擬環境中像下面AttributeError的:「模塊」對象有沒有屬性「殼牌」的IPython中

pip install ipython 

Downloading/unpacking ipython 
    Downloading ipython-2.0.0.tar.gz (11.9MB): 11.9MB downloaded 
    Running setup.py egg_info for package ipython 

Installing collected packages: ipython 
    Running setup.py install for ipython 
    checking package data 

    Installing ipengine2 script to /home/user/.virtualenvs/project/bin 
    Installing iptest script to /home/user/.virtualenvs/project/bin 
    Installing ipython2 script to /home/user/.virtualenvs/project/bin 
    Installing ipcluster2 script to /home/user/.virtualenvs/project/bin 
    Installing ipcluster script to /home/user/.virtualenvs/project/bin 
    Installing ipython script to /home/user/.virtualenvs/project/bin 
    Installing ipcontroller2 script to /home/user/.virtualenvs/project/bin 
    Installing ipcontroller script to /home/user/.virtualenvs/project/bin 
    Installing iptest2 script to /home/user/.virtualenvs/project/bin 
    Installing ipengine script to /home/user/.virtualenvs/project/bin 
Successfully installed ipython 
Cleaning up... 

所以,當我從裏面的virtualenv開始我的殼爲python manage.py shell我看到以下錯誤

Traceback (most recent call last): 
    File "manage.py", line 11, in <module> 
    execute_manager(settings) 
    File "/home/user/.virtualenvs/project/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager 
    utility.execute() 
    File "/home/user/.virtualenvs/project/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute 
    self.fetch_command(subcommand).run_from_argv(self.argv) 
    File "/home/user/.virtualenvs/project/local/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv 
    self.execute(*args, **options.__dict__) 
    File "/home/user/.virtualenvs/project/local/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute 
    output = self.handle(*args, **options) 
    File "/home/user/.virtualenvs/project/local/lib/python2.7/site-packages/django/core/management/base.py", line 351, in handle 
    return self.handle_noargs(**options) 
    File "/home/user/.virtualenvs/project/local/lib/python2.7/site-packages/django/core/management/commands/shell.py", line 29, in handle_noargs 
    shell = IPython.Shell.IPShell(argv=[]) 
AttributeError: 'module' object has no attribute 'Shell' 

Django的版本 - 1.2.3 IPython的版本里面VENV - 2.0.0

那麼,爲什麼它是一個出現nd如何避免,我以前沒有經歷過這個

回答

0

我有同樣的問題。我通過將Django升級到1.2.7來解決它。

pip install --upgrade django==1.2.7 

如果這是不可能的,你可以嘗試安裝舊版本的IPython的,但如果作品我沒有測試過。

相關問題