Importerror:no module named Argparse

Source: Internet
Author: User

If you have root privileges, you can run:

Easy_install Argparse

If you do not have root privileges, as a simple solution copy from argparse.py 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 the users who still need to support Python < 2.7 or < 3.2, it's 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 is 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.