python - 安装 python dateutil

标签 python django python-dateutil

我尝试为我的 django sweetpie 安装 python dateutil 但不成功,

http://labix.org/python-dateutil#head-2f49784d6b27bae60cde1cff6a535663cf87497b

我下载了c:/python27中的tar文件并解压,

我收到以下错误消息,

**C:\Python27\Scripts>**easy_install dateutil-1.5
Searching for dateutil-1.5
Reading http://pypi.python.org/simple/dateutil-1.5/
Couldn't find index page for 'dateutil-1.5' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for dateutil-1.5
Best match: None
Traceback (most recent call last):
  File "C:\Python27\Scripts\easy_install-script.py", line 8, in <module>
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')()
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 171
2, in main
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 170
0, in with_ei_usage
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 171
6, in <lambda>
  File "C:\Python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 211
, in run
  File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 434
, in easy_install
  File "build/bdist.linux-i686/egg/setuptools/package_index.py", line 475, in fe
tch_distribution
AttributeError: 'NoneType' object has no attribute 'clone'

最佳答案

这将安装 tastypie 及其依赖项:

$ easy_install pip
$ pip install django-tastypie

仅获取 dateutil:

$ pip install python-dateutil

关于python - 安装 python dateutil,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11962714/

相关文章:

python - 将 2 个给定日期之间的天数拆分为特定的批量大小,并相应地获取开始日期和结束日期

python - 将 ASP.Net JSON 日期转换为 Python 日期时间

python - 如何在 Python elasticsearch 中转义连字符

python - 如何使下拉菜单可滚动

python - 如何在 mysql/django 中添加一个仅限一行的表?

python - 月/年字符串的 dateutil 解析器

python - 在多级索引的一个级别上过滤 Pandas 数据框

python - Django 自定义登录页面

python - 从 python 3.5 中的函数返回多个值

django - 如何在我的查询中使用反向关系?(django)