使用MySQL数据库运行imdbpy2sql.py时返回错误 [英] Error returned when running imdbpy2sql.py with MySQL database
问题描述
我正在努力安装和工作IMDbPY,现在我正在努力将平面(文本)文件中的所有数据提取到(MySQL)数据库中.
I am working on getting IMDbPY installed and working and I have come to a point where I am working on pulling in all of the data from the flat (text) files in to a (MySQL) database.
当我运行适当的命令时:
When I run the appropriate command:
imdbpy2sql.py -d/tmp/IMDB/-u'mysql://user:password @ host/database'
imdbpy2sql.py -d /tmp/IMDB/ -u 'mysql://user:password@host/database'
我收到以下错误:
Traceback (most recent call last): File "/usr/local/bin/imdbpy2sql.py", line 4, in <module>
import pkg_resources File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2672, in <module>
working_set.require(__requires__) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 654, in require
needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 552, in resolve
raise DistributionNotFound(req) pkg_resources.DistributionNotFound: Tempita>=0.4
我也尝试使用-o [sqlobject|sqlalchemy]
选项,但无济于事.
I have tried using the -o [sqlobject|sqlalchemy]
options as well but to no avail.
我只是在寻找解决方案或此错误的原因,以便我继续前进.有人以前见过此事或知道原因吗?
I am simply looking for a resolution or the cause for this error so that I can move forward. Has anyone seen this before or know of the cause?
如果这很简单,我会道歉,但是我绝对不是Python专家,在互联网上寻找答案时,我破产了.
My apologies if this is simple but `I am by no means a Python guru and in searching the internet for answers I have come up bust.
任何帮助将不胜感激!
推荐答案
您需要Tempita软件包.使用发行版的软件包管理器进行安装-例如,对于Ubuntu,将是"apt-get install python-tempita".
You need the Tempita package. Install it using your distribution's package manager - e.g., for Ubuntu it would be "apt-get install python-tempita".
这篇关于使用MySQL数据库运行imdbpy2sql.py时返回错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!