python pip似乎根本没有做任何事情

时间:2014-02-11 23:48:55

标签: python cygwin pip easy-install

我在Cygwin。已经从Cygwin安装程序安装了Python和setuptools。一切似乎都井然有序:

% which python
/usr/bin/python
% python --version
Python 2.7.5

% which easy_install
/usr/bin/easy_install
% head -n1 `which easy_install`
#!/usr/bin/python

然后我使用easy_install来安装pip

% easy_install pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 1.5.2
Downloading https://pypi.python.org/packages/source/p/pip/pip-1.5.2.tar.gz#md5=5da30919f732d68b1c666e484e7676f5
Processing pip-1.5.2.tar.gz
Writing /tmp/easy_install-nDQrFF/pip-1.5.2/setup.cfg
Running pip-1.5.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-nDQrFF/pip-1.5.2/egg-dist-tmp-9JbeeX
warning: no files found matching 'pip/cacert.pem'
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Adding pip 1.5.2 to easy-install.pth file
Installing pip script to /usr/bin
Installing pip2.7 script to /usr/bin
Installing pip2 script to /usr/bin

Installed /usr/lib/python2.7/site-packages/pip-1.5.2-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
easy_install pip  3.96s user 3.16s system 76% cpu 9.367 total

看起来安装得很好:

% which pip
/usr/bin/pip
% head -n1 `which pip`
#!/usr/bin/python2.7
% ls -l /usr/bin/python
lrwxrwxrwx 1 kwilliams 13 Dec 27 18:47 /usr/bin/python -> python2.7.exe*

然后我尝试使用pip来安装一些东西,它似乎什么都不做:

% pip install jinja2
% ls /usr/lib/python2.7/site-packages/jinja*
zsh: no matches found: /usr/lib/python2.7/site-packages/jinja*
% python -c "import jinja2"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named jinja2
%

我是否误解了我应该如何使用这些工具?

1 个答案:

答案 0 :(得分:1)

大写jinja

pip install Jinja2