1

我是 python 和 Django 的菜鸟,我尝试使用 django-tables2,但是当我想要导入时,我的项目找不到 django-tables2。

我的 Python 路径是c:/Python27,我正在尝试使用(Windows XP、2.7.3 和 Django 1.4)安装 django-tables2:

pip install django-tables2

\Lib\site-packages\django_tables2-0.11.0-py2.7.egg-info仅使用这些文件创建此文件夹

 27/07/2012  16:45 1      dependency_links.txt
 27/07/2012  16:45 1.422  installed-files.txt
 27/07/2012  16:45 662    PKG-INFO
 27/07/2012  16:45 12     requires.txt
 27/07/2012  16:45 1.271  SOURCES.txt
 27/07/2012  16:45 15     top_level.txt

但在 installed-files.txt 中还有更多文件尚未创建。

在我的项目中,导入无法解析“ import django-tables2

你知道会发生什么吗?

谢谢

4

3 回答 3

1

使用命令就OK了:

pip install django-tables2

下面是命令输出:

Downloading/unpacking django-tables2
  Downloading django-tables2-0.11.0.tar.gz
  Running setup.py egg_info for package django-tables2

Requirement already satisfied (use --upgrade to upgrade): Django>=1.3 in /usr/local/lib/python2.7/dist-packages (from django-tables2)
Installing collected packages: django-tables2
  Running setup.py install for django-tables2

Successfully installed django-tables2
Cleaning up...
于 2012-08-08T07:39:20.997 回答
0

try to use easy_install or setup_tools and install all packs with pip install or etc.

于 2012-07-27T20:23:45.237 回答
-1

试试 sudo pip ... mybe 你需要 root 来安装它

于 2013-08-15T05:55:18.423 回答