3

I am new to Python. I am trying to install a few packages and so far have only installed OpenCV and numpy for Python 3.7. When trying to install argparse, I encounter an issue:

>conda install argparse
Collecting package metadata: done
Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - argparse
  - conda[version='>=4.6.4']

I am surprised these two common packages are not compatible, have I done something wrong? I was able to install argparse in a specific environment but I would like to not install it only for a specific environment. Is there a way to do this?

Nakx
  • 1,460
  • 1
  • 23
  • 32
  • 1
    um, argeparse is part of the standard library, are you running some non-conventional python distrbution? – juanpa.arrivillaga Feb 21 '19 at 23:27
  • No. Sorry I missed this, I guess I need to follow some more basic tutorials about libraries. – Nakx Feb 21 '19 at 23:33
  • `argparse` is included with Python starting with version 2.7, so you probably don't actually need it if your environment is using Python 3.7. That said, recipes attempting to support earlier versions of Python may include `argparse` as a requirement to ensure that it exists. In this case, the recipe meta.yaml should probably be updated to specify that argparse is only needed for Python < 2.7. – Keith Hughitt Aug 25 '19 at 22:36

1 Answers1

4

Argparse should be native in python (i.e. you don't need to install it. It exists). Furthermore, if for whatever reason you still want to install argparse again, try adding anaconda channel like so:

conda install -c anaconda argparse