安装python dateuti

2024-04-29 02:10:43 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图为我的django tastype安装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'

Tags: installruninpybuildegglinuxeasy
3条回答

我不确定这在Windows上是否不同,但似乎您没有引用实际的链接(请参见阅读行)。相反,请尝试以下操作:

easy_install python-dateutil

那将(希望)得到你需要的包裹。另外,请参阅this文章了解类似的问题。

这将安装tastypie及其依赖项:

$ easy_install pip
$ pip install django-tastypie

要仅获取dateutil:

$ pip install python-dateutil

在Windows上:

只需使用以下代码

$ pip install python-dateutil

如果您想使用easy_install try below命令,(以管理员身份运行命令提示符CMD)

$ easy_install python-dateutil

在Ubuntu上:

对于Ubuntu操作系统,请使用以下代码:

sudo apt-get install python-dateutil

相关问题 更多 >