David Friedman added the comment:
I know this is 6 years too late, but I had this problem a few minutes ago on
Python2.7. Googling didn't find me anything relevant except this bug entry.
However, I found the cause myself: I had a test file named argparse.py (and an
argparse.pyc) in the
Ezio Melotti added the comment:
Closing for lack of feedback.
Feel free to re-open if/when more info are available.
--
nosy: +ezio.melotti
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20840
Changes by R. David Murray rdmur...@bitdance.com:
--
resolution: - works for me
stage: - committed/rejected
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20840
___
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20840
___
___
Python-bugs-list
New submission from bsduni:
Hi!
I have installed Python 2.7.6 fully (all the modules selected). I attempted run
some Python codes that were developed by a past staff, and am stuck with an
issue with argparse.
For ease of explanation I am using the example given in this website at
Arfrever Frehtes Taifersar Arahesis added the comment:
I guess that there is argparse module in current directory, which overrides
argparse module from standard library.
Use e.g. print(argparse) or print(argparse.__file__) to find it.
A correct location would be something like
bsduni added the comment:
Unfortunately it is not that case, ie, no argparse in my current working
directory /home/bsduni/pytests/ (on a FreeBSD 9.2 system).
The following are the locations I can find argparse in my system:
/usr/local/lib/python2.7/argparse.py
R. David Murray added the comment:
Please show the output from
print(argparse.__file__)
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20840
___