Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

装了Mysqldb,但是抛错 #3

Open
sechacking opened this issue Apr 27, 2015 · 2 comments
Open

装了Mysqldb,但是抛错 #3

sechacking opened this issue Apr 27, 2015 · 2 comments

Comments

@sechacking
Copy link

这个错误是芹菜系统抛出的。

Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/celery/app/trace.py", line 283, in trace_task
uuid, retval, SUCCESS, request=task_request,
File "/usr/local/lib/python2.7/site-packages/celery/backends/base.py", line 256, in store_result
request=request, **kwargs)
File "/usr/local/lib/python2.7/site-packages/celery/backends/database/init.py", line 63, in _inner
return fun(_args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/celery/backends/database/init.py", line 118, in _store_result
session = self.ResultSession()
File "/usr/local/lib/python2.7/site-packages/celery/backends/database/init.py", line 111, in ResultSession
*_self.engine_options
File "/usr/local/lib/python2.7/site-packages/celery/backends/database/session.py", line 60, in session_factory
engine, session = self.create_session(dburi, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/celery/backends/database/session.py", line 46, in create_session
engine = self.get_engine(dburi, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/celery/backends/database/session.py", line 43, in get_engine
return create_engine(dburi, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/init.py", line 386, in create_engine
return strategy.create(_args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 74, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/mysqldb.py", line 92, in dbapi
return import('MySQLdb')
ImportError: No module named MySQLdb

在服务器上进入python shell

import Mysqldb 不会显示说没这个东西?什么原因?

@ghost
Copy link

ghost commented Feb 12, 2016

好奇怪的原因,sudo试试,或者用virtualenv重建个环境

@ring04h
Copy link
Owner

ring04h commented Sep 19, 2016

python-mysql 库没安装成功

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants