使用Python 2.7.3 IEPD_free(32位)在Mac OS x 10.7.5中运行Scrapy所需的文件 [英] Required files to run Scrapy in Mac OS x 10.7.5, using Python 2.7.3 IEPD_free (32 bit)

查看:64
本文介绍了使用Python 2.7.3 IEPD_free(32位)在Mac OS x 10.7.5中运行Scrapy所需的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是第一次测试scrapy,并在使用以下命令安装后:

I am testing scrapy for the first time, and after installing it with the command:

sudo easy_install -U scrapy

一切似乎都正常.但是,当我运行时:

everything seems to run ok. However, when I run:

scrapy startproject tutorial

我得到以下信息:

luismacbookpro:~ luis$ scrapy startproject tutorial
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/Current/bin/scrapy", line 4, in <module>
import pkg_resources
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/pkg_resources.py", line 2711, in <module>
working_set.require(__requires__)
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/pkg_resources.py", line 690, in require
needed = self.resolve(parse_requirements(requirements))
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/pkg_resources.py", line 588, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: lxml

关于发生了什么的任何想法?如您所知,我一点都不精通OSX,并且我仍在尝试从Windows的心理"迁移到OSX,所以我不知道在哪里添加路径,修改设置,依赖项等.确定如何执行全新卸载并重新开始.

Any idea about what's going on? As you can tell, I am not proficient at all with OSX, and I am still trying to move from a windows "mentality" to OSX, so I don't know where to add paths, modify settings, dependencies, etc. Not even sure how to perform a clean uninstall and start all over.

感谢您提供任何反馈,甚至您的建议也可以使用其他可以执行scrapy相同功能的python库.谢谢!

Any feedback is appreciated, even your suggestions to use alternative python libraries that can perform the same functionality of scrapy. Thanks!

推荐答案

我认为这将解决您所看到的错误消息:

I think this will solve the error message you're seeing:

sudo easy_install --upgrade lxml

在Mac上使用pip安装某些程序包并使用easy_install安装其他程序包时,可能会出现此问题.

This problem can arise on Macs when you use pip to install some packages and easy_install to install others.

让我们知道您的前进:)

Let us know how you go :)

这篇关于使用Python 2.7.3 IEPD_free(32位)在Mac OS x 10.7.5中运行Scrapy所需的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆