首页 > 其他 > 详细

ImportError: No module named argparse

时间:2015-06-15 16:16:52      阅读:1177      评论:0      收藏:0      [点我收藏+]

如果有root权限,可以运行:

easy_install argparse

 

如果没有root权限,As a simple solution copy argparse.py from https://code.google.com/p/argparse/source/browse/argparse.py to your project folder.

 

REF:

https://pypi.python.org/pypi/argparse

https://code.google.com/p/argparse/source/browse/argparse.py

http://stackoverflow.com/questions/21359400/python-2-6-importerror-no-module-named-argparse

 

As of Python >= 2.7 and >= 3.2, the argparse module is maintained within the Python standard library. For users who still need to support Python < 2.7 or < 3.2, it is also provided as a separate package, which tries to stay compatible with the module in the standard library, but also supports older Python versions.

argparse is licensed under the Python license, for details see LICENSE.txt.

Compatibility

argparse should work on Python >= 2.3, it was tested on:

  • 2.3, 2.4, 2.5, 2.6 and 2.7
  • 3.1, 3.2, 3.3, 3.4

Installation

Try one of these:

python setup.py install

easy_install argparse

pip install argparse

putting argparse.py in some directory listed in sys.path should also work

ImportError: No module named argparse

原文:http://www.cnblogs.com/emanlee/p/4577249.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!