给出ImportError的python manage.py build_solr_schema:没有名为markup的模块

时间:2014-01-16 07:53:09

标签: python django solr

这是堆栈跟踪:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 399,     in execute_from_command_line
    utility.execute()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 284, in execute
    self.validate()
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 310, in validate
    num_errors = get_validation_errors(s, app)
  File "/Library/Python/2.7/site-packages/django/core/management/validation.py", line 34, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/Library/Python/2.7/site-packages/django/db/models/loading.py", line 196, in get_app_errors
    self._populate()
  File "/Library/Python/2.7/site-packages/django/db/models/loading.py", line 75, in _populate
    self.load_app(app_name, True)
  File "/Library/Python/2.7/site-packages/django/db/models/loading.py", line 97, in load_app
    app_module = import_module(app_name)
  File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
ImportError: No module named markup

这是

的输出

pip freeze

Django==1.6.1
Fabric==1.8.1
MySQL-python==1.2.5
PyRSS2Gen==1.0.0
Twisted==12.0.0
altgraph==0.9
bdist-mpkg==0.4.4
bonjour-py==0.3
django-activity-stream==0.4.4
django-extensions==1.3.2
django-grappelli==2.5.1
django-haystack==2.1.0
django-markup==0.4
docutils==0.11
ecdsa==0.10
macholib==1.4.2
markup==0.2
modulegraph==0.9.1
money==1.0.2
numpy==1.6.1
paramiko==1.12.1
py2app==0.6.3
pyOpenSSL==0.13
pycrypto==2.6.1
pyobjc-core==2.3.2a0
pyobjc-framework-AddressBook==2.3.2a0
pyobjc-framework-AppleScriptKit==2.3.2a0
pyobjc-framework-AppleScriptObjC==2.3.2a0
pyobjc-framework-Automator==2.3.2a0
pyobjc-framework-CFNetwork==2.3.2a0
pyobjc-framework-CalendarStore==2.3.2a0
pyobjc-framework-Cocoa==2.3.2a0
pyobjc-framework-Collaboration==2.3.2a0
pyobjc-framework-CoreData==2.3.2a0
pyobjc-framework-CoreLocation==2.3.2a0
pyobjc-framework-CoreText==2.3.2a0
pyobjc-framework-DictionaryServices==2.3.2a0
pyobjc-framework-ExceptionHandling==2.3.2a0
pyobjc-framework-FSEvents==2.3.2a0
pyobjc-framework-InputMethodKit==2.3.2a0
pyobjc-framework-InstallerPlugins==2.3.2a0
pyobjc-framework-InstantMessage==2.3.2a0
pyobjc-framework-InterfaceBuilderKit==2.3.2a0
pyobjc-framework-LatentSemanticMapping==2.3.2a0
pyobjc-framework-LaunchServices==2.3.2a0
pyobjc-framework-Message==2.3.2a0
pyobjc-framework-OpenDirectory==2.3.2a0
pyobjc-framework-PreferencePanes==2.3.2a0
pyobjc-framework-PubSub==2.3.2a0
pyobjc-framework-QTKit==2.3.2a0
pyobjc-framework-Quartz==2.3.2a0
pyobjc-framework-ScreenSaver==2.3.2a0
pyobjc-framework-ScriptingBridge==2.3.2a0
pyobjc-framework-SearchKit==2.3.2a0
pyobjc-framework-ServerNotification==2.3.2a0
pyobjc-framework-ServiceManagement==2.3.2a0
pyobjc-framework-SyncServices==2.3.2a0
pyobjc-framework-SystemConfiguration==2.3.2a0
pyobjc-framework-WebKit==2.3.2a0
pyobjc-framework-XgridFoundation==2.3.2a0
pysolr==3.1.0
python-dateutil==1.5
pytz==2013.9
raven==4.0.3
requests==2.2.0
six==1.5.2
stevedore==0.13
virtualenv==1.11
virtualenv-clone==0.2.4
virtualenvwrapper==4.2
wsgiref==0.1.2
xattr==0.6.2
zope.interface==3.5.1

3 个答案:

答案 0 :(得分:4)

这是一个快速修复:

删除django.contrib.markup

安装django-markup-deprecated

 pip install django-markup-deprecated

markup_deprecated添加到您的INSTALLED_APPS

有关详细信息,请转到此处:https://pypi.python.org/pypi/django-markup-deprecated

答案 1 :(得分:2)

django.utils.markup在1.5中已弃用,已在1.6

中删除

答案 2 :(得分:2)

您需要从django.contrib.markup

中删除settings.py