[英]Installing pyquery mac
我嘗試首先使用pypm安裝它,並且基本上具有與pip相同的體驗(為此,我已經復制/粘貼了下面的輸出)。 安裝提示說它已安裝,對於pip和pypm,pyquery會在安裝列表中出現。 但是當我進入python解釋器時,顯然沒有安裝pyquery:o
我究竟做錯了什么?
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)
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...
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)
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
>>>>
對於Mac,我從終端命令行使用easy_install。您首先需要從此處安裝setuptools: https ://pypi.python.org/pypi/setuptools位於頁面底部,您可以找到mac下載文件。 然后解壓縮該文件,然后運行ez_setup進行安裝。
我對此進行了測試,並立即安裝了pyquery。 我使用的代碼是: sudo easy_install pyquery
然后輸入密碼,然后重新啟動python,並在python控制台上鍵入import pyquery
,這被接受。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.