pythonpip安装模块_使用pip安装Python模块

我正在安装一个叫Scrapy的模块。我是用pip install Scrapy

我在/usr/local/lib/python2.7/site-packages中看到了“scrapy”文件夹,但是当我试图将其导入到Python程序中时,发现没有使用该名称的模块。你知道为什么会这样吗?

编辑:以下是pip命令的输出:Downloading/unpacking Scrapy

Downloading Scrapy-0.20.0.tar.gz (745kB): 745kB downloaded

Running setup.py egg_info for package Scrapy

no previously-included directories found matching 'docs/build'

Requirement already satisfied (use --upgrade to upgrade): Twisted>=10.0.0 in /usr/local/lib/python2.7/site-packages (from Scrapy)

Requirement already satisfied (use --upgrade to upgrade): w3lib>=1.2 in /usr/local/lib/python2.7/site-packages (from Scrapy)

Requirement already satisfied (use --upgrade to upgrade): queuelib in /usr/local/lib/python2.7/site-packages (from Scrapy)

Requirement already satisfied (use --upgrade to upgrade): lxml in /usr/local/lib/python2.7/site-packages (from Scrapy)

Requirement already satisfied (use --upgrade to upgrade): pyOpenSSL in /usr/local/lib/python2.7/site-packages (from Scrapy)

Requirement already satisfied (use --upgrade to upgrade): cssselect>=0.9 in /usr/local/lib/python2.7/site-packages (from Scrapy)

Requirement already satisfied (use --upgrade to upgrade): zope.interface>=3.6.0 in /usr/local/lib/python2.7/site-packages (from Twisted>=10.0.0->Scrapy)

Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/local/lib/python2.7/site-packages (from w3lib>=1.2->Scrapy)

Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/site-packages/setuptools-1.1.6-py2.7.egg (from zope.interface>=3.6.0->Twisted>=10.0.0->Scrapy)

Installing collected packages: Scrapy

Running setup.py install for Scrapy

changing mode of build/scripts-2.7/scrapy from 644 to 755

no previously-included directories found matching 'docs/build'

changing mode of /usr/local/bin/scrapy to 755

Successfully installed Scrapy

Cleaning up...

当我运行/usr/local/bin/scrapy时,我得到了命令和可用命令的用法。我注意到在我的/usr/local/bin中有一个python2.7和python2.7-32,我记得因为Mavericks的问题安装了32位版本。

以下是python /usr/local/bin/scrapy的输出:Traceback (most recent call last): File "/usr/local/bin/scrapy", line 3, in from scrapy.cmdline import execute ImportError: No module named scrapy.cmdline

以及head /usr/local/bin/scrapy:#!/usr/local/opt/python/bin/python2.7 from scrapy.cmdline import execute execute()

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值