prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  version requirement of dependencies
  When I try installing Qcodes with `python setup.py develop` I get an error:
  
  ```
  Traceback (most recent call last):
    File ".\setup.py", line 81, in <module>
      if StrictVersion(module.__version__) < StrictVersion(min_version):
    File "C:\anaconda\lib\distutils\version.py", line 40, in __init__
      self.parse(vstring)
    File "C:\anaconda\lib\distutils\version.py", line 137, in parse
      raise ValueError("invalid version number '%s'" % vstring)
  ValueError: invalid version number 'pyqtgraph-0.9.10-100-gf224936'
  ```
  
  So I have a specific branch of pyqtgraph installed that has a somehow funny version number, but it is larger than the required `0.9.10`.
  
  Is there any way to make this work without swiching the pyqtgraph branch and then switching it back?
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setup.py`
  Content:
  ```
  1 from setuptools import setup, find_packages
  2 from distutils.version import StrictVersion
  3 from importlib import import_module
  4 
  5 
  6 def readme():
  7     with open('README.md') as f:
  8         return f.read()
  9 
  10 extras = {
  11     'MatPlot': ('matplotlib', '1.5'),
  12     'QtPlot': ('pyqtgraph', '0.9.10'),
  13     'coverage tests': ('coverage', '4.0')
  14 }
  15 extras_require = {k: '>='.join(v) for k, v in extras.items()}
  16 
  17 setup(name='qcodes',
  18       version='0.1.0',
  19       use_2to3=False,
  20       author='Alex Johnson',
  21       author_email='johnson.alex.c@gmail.com',
  22       maintainer='Alex Johnson',
  23       maintainer_email='johnson.alex.c@gmail.com',
  24       description='Python-based data acquisition framework developed by the '
  25                   'Copenhagen / Delft / Sydney / Microsoft quantum computing '
  26                   'consortium',
  27       long_description=readme(),
  28       url='https://github.com/qdev-dk/Qcodes',
  29       classifiers=[
  30           'Development Status :: 3 - Alpha',
  31           'Intended Audience :: Science/Research',
  32           'Programming Language :: Python :: 3 :: Only',
  33           'Programming Language :: Python :: 3.3',
  34           'Programming Language :: Python :: 3.4',
  35           'Programming Language :: Python :: 3.5',
  36           'Topic :: Scientific/Engineering'
  37       ],
  38       license='Private',
  39       # if we want to install without tests:
  40       # packages=find_packages(exclude=["*.tests", "tests"]),
  41       packages=find_packages(),
  42       package_data={'qcodes': ['widgets/*.js', 'widgets/*.css']},
  43       install_requires=[
  44           'numpy>=1.10',
  45           'pyvisa>=1.8',
  46           'IPython>=4.0',
  47           'ipywidgets>=4.1',
  48           # nose and coverage are only for tests, but we'd like to encourage
  49           # people to run tests!
  50           # coverage has a problem with setuptools on Windows, moved to extras
  51           'nose>=1.3'
  52       ],
  53       test_suite='qcodes.tests',
  54       extras_require=extras_require,
  55       # I think the only part of qcodes that would care about zip_safe
  56       # is utils.helpers.reload_code; users of a zip-installed package
  57       # shouldn't be needing to do this anyway, but we should test first.
  58       zip_safe=False)
  59 
  60 version_template = '''
  61 *****
  62 ***** package {0} must be at least version {1}.
  63 ***** Please upgrade it (pip install -U {0} or conda install {0})
  64 ***** in order to use {2}
  65 *****
  66 '''
  67 
  68 missing_template = '''
  69 *****
  70 ***** package {0} not found
  71 ***** Please install it (pip install {0} or conda install {0})
  72 ***** in order to use {1}
  73 *****
  74 '''
  75 
  76 # now test the versions of extras
  77 for extra, (module_name, min_version) in extras.items():
  78     try:
  79         module = import_module(module_name)
  80         if StrictVersion(module.__version__) < StrictVersion(min_version):
  81             print(version_template.format(module_name, min_version, extra))
  82     except ImportError:
  83         print(missing_template.format(module_name, extra))
  84
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -73,6 +73,15 @@
   *****
   '''
   
  +valueerror_template = '''
  +*****
  +***** package {0} version not understood
  +***** Please make sure the installed version ({1})
  +***** is compatible with the minimum required version ({2})
  +***** in order to use {3}
  +*****
  +'''
  +
   # now test the versions of extras
   for extra, (module_name, min_version) in extras.items():
       try:
  @@ -81,3 +90,5 @@
               print(version_template.format(module_name, min_version, extra))
       except ImportError:
           print(missing_template.format(module_name, extra))
  +    except ValueError:
  +        print(valueerror_template.format(module_name, module.__version__, min_version, extra))
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -73,6 +73,15 @@\n *****\n '''\n \n+valueerror_template = '''\n+*****\n+***** package {0} version not understood\n+***** Please make sure the installed version ({1})\n+***** is compatible with the minimum required version ({2})\n+***** in order to use {3}\n+*****\n+'''\n+\n # now test the versions of extras\n for extra, (module_name, min_version) in extras.items():\n     try:\n@@ -81,3 +90,5 @@\n             print(version_template.format(module_name, min_version, extra))\n     except ImportError:\n         print(missing_template.format(module_name, extra))\n+    except ValueError:\n+        print(valueerror_template.format(module_name, module.__version__, min_version, extra))\n", "issue": "version requirement of dependencies\nWhen I try installing Qcodes with `python setup.py develop` I get an error:\n\n```\nTraceback (most recent call last):\n  File \".\\setup.py\", line 81, in <module>\n    if StrictVersion(module.__version__) < StrictVersion(min_version):\n  File \"C:\\anaconda\\lib\\distutils\\version.py\", line 40, in __init__\n    self.parse(vstring)\n  File \"C:\\anaconda\\lib\\distutils\\version.py\", line 137, in parse\n    raise ValueError(\"invalid version number '%s'\" % vstring)\nValueError: invalid version number 'pyqtgraph-0.9.10-100-gf224936'\n```\n\nSo I have a specific branch of pyqtgraph installed that has a somehow funny version number, but it is larger than the required `0.9.10`.\n\nIs there any way to make this work without swiching the pyqtgraph branch and then switching it back?\n\n", "before_files": [{"content": "from setuptools import setup, find_packages\nfrom distutils.version import StrictVersion\nfrom importlib import import_module\n\n\ndef readme():\n    with open('README.md') as f:\n        return f.read()\n\nextras = {\n    'MatPlot': ('matplotlib', '1.5'),\n    'QtPlot': ('pyqtgraph', '0.9.10'),\n    'coverage tests': ('coverage', '4.0')\n}\nextras_require = {k: '>='.join(v) for k, v in extras.items()}\n\nsetup(name='qcodes',\n      version='0.1.0',\n      use_2to3=False,\n      author='Alex Johnson',\n      author_email='johnson.alex.c@gmail.com',\n      maintainer='Alex Johnson',\n      maintainer_email='johnson.alex.c@gmail.com',\n      description='Python-based data acquisition framework developed by the '\n                  'Copenhagen / Delft / Sydney / Microsoft quantum computing '\n                  'consortium',\n      long_description=readme(),\n      url='https://github.com/qdev-dk/Qcodes',\n      classifiers=[\n          'Development Status :: 3 - Alpha',\n          'Intended Audience :: Science/Research',\n          'Programming Language :: Python :: 3 :: Only',\n          'Programming Language :: Python :: 3.3',\n          'Programming Language :: Python :: 3.4',\n          'Programming Language :: Python :: 3.5',\n          'Topic :: Scientific/Engineering'\n      ],\n      license='Private',\n      # if we want to install without tests:\n      # packages=find_packages(exclude=[\"*.tests\", \"tests\"]),\n      packages=find_packages(),\n      package_data={'qcodes': ['widgets/*.js', 'widgets/*.css']},\n      install_requires=[\n          'numpy>=1.10',\n          'pyvisa>=1.8',\n          'IPython>=4.0',\n          'ipywidgets>=4.1',\n          # nose and coverage are only for tests, but we'd like to encourage\n          # people to run tests!\n          # coverage has a problem with setuptools on Windows, moved to extras\n          'nose>=1.3'\n      ],\n      test_suite='qcodes.tests',\n      extras_require=extras_require,\n      # I think the only part of qcodes that would care about zip_safe\n      # is utils.helpers.reload_code; users of a zip-installed package\n      # shouldn't be needing to do this anyway, but we should test first.\n      zip_safe=False)\n\nversion_template = '''\n*****\n***** package {0} must be at least version {1}.\n***** Please upgrade it (pip install -U {0} or conda install {0})\n***** in order to use {2}\n*****\n'''\n\nmissing_template = '''\n*****\n***** package {0} not found\n***** Please install it (pip install {0} or conda install {0})\n***** in order to use {1}\n*****\n'''\n\n# now test the versions of extras\nfor extra, (module_name, min_version) in extras.items():\n    try:\n        module = import_module(module_name)\n        if StrictVersion(module.__version__) < StrictVersion(min_version):\n            print(version_template.format(module_name, min_version, extra))\n    except ImportError:\n        print(missing_template.format(module_name, extra))\n", "path": "setup.py"}], "after_files": [{"content": "from setuptools import setup, find_packages\nfrom distutils.version import StrictVersion\nfrom importlib import import_module\n\n\ndef readme():\n    with open('README.md') as f:\n        return f.read()\n\nextras = {\n    'MatPlot': ('matplotlib', '1.5'),\n    'QtPlot': ('pyqtgraph', '0.9.10'),\n    'coverage tests': ('coverage', '4.0')\n}\nextras_require = {k: '>='.join(v) for k, v in extras.items()}\n\nsetup(name='qcodes',\n      version='0.1.0',\n      use_2to3=False,\n      author='Alex Johnson',\n      author_email='johnson.alex.c@gmail.com',\n      maintainer='Alex Johnson',\n      maintainer_email='johnson.alex.c@gmail.com',\n      description='Python-based data acquisition framework developed by the '\n                  'Copenhagen / Delft / Sydney / Microsoft quantum computing '\n                  'consortium',\n      long_description=readme(),\n      url='https://github.com/qdev-dk/Qcodes',\n      classifiers=[\n          'Development Status :: 3 - Alpha',\n          'Intended Audience :: Science/Research',\n          'Programming Language :: Python :: 3 :: Only',\n          'Programming Language :: Python :: 3.3',\n          'Programming Language :: Python :: 3.4',\n          'Programming Language :: Python :: 3.5',\n          'Topic :: Scientific/Engineering'\n      ],\n      license='Private',\n      # if we want to install without tests:\n      # packages=find_packages(exclude=[\"*.tests\", \"tests\"]),\n      packages=find_packages(),\n      package_data={'qcodes': ['widgets/*.js', 'widgets/*.css']},\n      install_requires=[\n          'numpy>=1.10',\n          'pyvisa>=1.8',\n          'IPython>=4.0',\n          'ipywidgets>=4.1',\n          # nose and coverage are only for tests, but we'd like to encourage\n          # people to run tests!\n          # coverage has a problem with setuptools on Windows, moved to extras\n          'nose>=1.3'\n      ],\n      test_suite='qcodes.tests',\n      extras_require=extras_require,\n      # I think the only part of qcodes that would care about zip_safe\n      # is utils.helpers.reload_code; users of a zip-installed package\n      # shouldn't be needing to do this anyway, but we should test first.\n      zip_safe=False)\n\nversion_template = '''\n*****\n***** package {0} must be at least version {1}.\n***** Please upgrade it (pip install -U {0} or conda install {0})\n***** in order to use {2}\n*****\n'''\n\nmissing_template = '''\n*****\n***** package {0} not found\n***** Please install it (pip install {0} or conda install {0})\n***** in order to use {1}\n*****\n'''\n\nvalueerror_template = '''\n*****\n***** package {0} version not understood\n***** Please make sure the installed version ({1})\n***** is compatible with the minimum required version ({2})\n***** in order to use {3}\n*****\n'''\n\n# now test the versions of extras\nfor extra, (module_name, min_version) in extras.items():\n    try:\n        module = import_module(module_name)\n        if StrictVersion(module.__version__) < StrictVersion(min_version):\n            print(version_template.format(module_name, min_version, extra))\n    except ImportError:\n        print(missing_template.format(module_name, extra))\n    except ValueError:\n        print(valueerror_template.format(module_name, module.__version__, min_version, extra))\n", "path": "setup.py"}]}