使用 MySQL 数据库运行 imdbpy2sql.py 时返回错误
我正在努力安装 IMDbPY 并使其工作,并且我正在努力将平面(文本)文件中的所有数据提取到(MySQL)数据库中。
当我运行适当的命令时:
imdbpy2sql.py -d /tmp/IMDB/ -u 'mysql://用户:密码@主机/数据库'
我收到以下错误:
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]
也有选项,但没有效果。
我只是在寻找解决方案或此错误的原因,以便我可以继续前进。有谁以前见过这个或知道原因吗?
如果这很简单,我很抱歉,但“我绝不是 Python 大师,在互联网上搜索答案时我已经失败了。”
非常感谢任何帮助!
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'
I recieve the following error:
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
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?
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.
Any help is greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要 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".