通过pip安装包时发现find_package()错误

时间:2015-04-06 18:42:35

标签: python pip

'我正在尝试使用pip安装 django-dbsettings ,但会导致以下错误:

Downloading django-dbsettings-0.7.4.tar.gz
Running setup.py egg_info for package django-dbsettings
Traceback (most recent call last):
  File "<string>", line 16, in <module>
  File "/path/virtualenv/build/django-dbsettings/setup.py", line 23, in  <module>
    packages=find_packages(include=['dbsettings']),
TypeError: find_packages() got an unexpected keyword argument 'include'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "<string>", line 16, in <module>

File "/path/virtualenv/build/django-dbsettings/setup.py", line 23, in <module>

packages=find_packages(include=['dbsettings']),

TypeError: find_packages() got an unexpected keyword argument 'include'

我也使用pip 1.0和python 2.7。

我该如何解决?

1 个答案:

答案 0 :(得分:24)

使用旧版本的setuptools include中没有find_packages()个关键字,您需要升级:

pip install -U setuptools

我也会更新pip。