首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装pyquery mac

安装pyquery mac
EN

Stack Overflow用户
提问于 2014-03-19 17:40:54
回答 1查看 4.2K关注 0票数 2

我试着先用pypm安装它,基本上和使用pip (我已经复制/粘贴了下面的输出)的体验相同。安装提示显示它已经安装,对于pip和pypm,pyquery将出现在安装列表中。但是,当我进入python解释器时,显然没有安装pyquery :o

我做错了什么?

代码语言:javascript
复制
arnab:pybikes arnab$ pip list
cssselect (0.8)
lxml (3.2.3)
pip (1.4.1)
PyBikes (0.2dev)
pypm (1.4.0)
pythonselect (1.3)
requests (2.0.0)
setuptools (1.1.4)
virtualenv (1.10.1)
wsgiref (0.1.2)

代码语言:javascript
复制
arnab:pybikes arnab$ pip install pyquery
Downloading/unpacking pyquery
  Downloading pyquery-1.2.8.zip (42kB): 42kB downloaded
  Running setup.py egg_info for package pyquery

    no previously-included directories found matching 'docs/_build'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '__pycache__' found anywhere in distribution
Requirement already satisfied (use --upgrade to upgrade): lxml>=2.1 in /Users/arnab/Library/Python/2.7/lib/python/site-packages (from pyquery)
Requirement already satisfied (use --upgrade to upgrade): cssselect in /Users/arnab/Library/Python/2.7/lib/python/site-packages (from pyquery)
Installing collected packages: pyquery
  Running setup.py install for pyquery

    no previously-included directories found matching 'docs/_build'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '__pycache__' found anywhere in distribution
Successfully installed pyquery
Cleaning up...

代码语言:javascript
复制
arnab:pybikes arnab$ pip list
cssselect (0.8)
lxml (3.2.3)
pip (1.4.1)
PyBikes (0.2dev)
pypm (1.4.0)
pyquery (1.2.8)
pythonselect (1.3)
requests (2.0.0)
setuptools (1.1.4)
virtualenv (1.10.1)
wsgiref (0.1.2)

代码语言:javascript
复制
arnab:pybikes arnab$ python
Python 2.7.3 (480845e6b1dd, Jul 31 2013, 10:58:28)
[PyPy 2.1.0 with GCC 4.2.1 Compatible Clang Compiler] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``the future has just begun''
>>>> import pyquery
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pyquery
>>>> 
EN

回答 1

Stack Overflow用户

发布于 2014-12-23 13:17:20

对于mac,我使用终端命令easy_install,line.You首先需要安装setuptools:https://pypi.python.org/pypi/setuptools就在页面底部,您可以找到mac下载。然后解压缩文件,并运行ez_setup来安装它。

我对此进行了测试,并立即安装了pyquery。我使用的代码是:sudo easy_install pyquery,然后输入密码,然后重新启动python,然后在python控制台上输入import pyquery,这被接受了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22513915

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档