diff --git a/setup_cfg_fmt.py b/setup_cfg_fmt.py
index be8eb0d..a2b637e 100644
--- a/setup_cfg_fmt.py
+++ b/setup_cfg_fmt.py
@@ -259,7 +259,8 @@ def _normalize_lib(lib: str) -> str:
 def _req_base(lib: str) -> str:
     basem = re.match(BASE_NAME_REGEX, lib)
     assert basem
-    return basem.group(0)
+    # pip replaces _ with - in package names
+    return basem.group(0).replace('_', '-')
 
 
 def _py_classifiers(

diff --git a/tests/setup_cfg_fmt_test.py b/tests/setup_cfg_fmt_test.py
index 05a7b8d..d7e7f36 100644
--- a/tests/setup_cfg_fmt_test.py
+++ b/tests/setup_cfg_fmt_test.py
@@ -72,6 +72,7 @@ def test_noop(tmpdir):
             'name = pkg\n'
             '[options]\n'
             '{} =\n'
+            '    req_req\n'
             '    req03\n'
             '    req05 <= 2,!=1\n'
             '    req06 ;python_version==2.7\n'
@@ -97,6 +98,7 @@ def test_noop(tmpdir):
             '[options]\n'
             '{} =\n'
             '    req>=2\n'
+            '    req-req\n'
             '    req01\n'
             '    req02\n'
             '    req03\n'

normalize requirements names to be dashed-names
tests/setup_cfg_fmt_test.py::test_rewrite_requires[install_requires-normalizes tests/setup_cfg_fmt_test.py::test_rewrite_requires[setup_requires-normalizes
tests/setup_cfg_fmt_test.py::test_ver_type_ok tests/setup_cfg_fmt_test.py::test_ver_type_error tests/setup_cfg_fmt_test.py::test_ver_type_not_a_version tests/setup_cfg_fmt_test.py::test_case_insensitive_glob[foo-[Ff][Oo][Oo]] tests/setup_cfg_fmt_test.py::test_case_insensitive_glob[FOO-[Ff][Oo][Oo]] tests/setup_cfg_fmt_test.py::test_case_insensitive_glob[licen[sc]e-[Ll][Ii][Cc][Ee][Nn][SsCc][Ee]] tests/setup_cfg_fmt_test.py::test_noop tests/setup_cfg_fmt_test.py::test_rewrite[orders tests/setup_cfg_fmt_test.py::test_rewrite[normalizes tests/setup_cfg_fmt_test.py::test_rewrite[sorts tests/setup_cfg_fmt_test.py::test_rewrite[normalize tests/setup_cfg_fmt_test.py::test_normalize_lib[no tests/setup_cfg_fmt_test.py::test_normalize_lib[whitespace tests/setup_cfg_fmt_test.py::test_normalize_lib[<= tests/setup_cfg_fmt_test.py::test_normalize_lib[>= tests/setup_cfg_fmt_test.py::test_normalize_lib[b/w tests/setup_cfg_fmt_test.py::test_normalize_lib[compatible tests/setup_cfg_fmt_test.py::test_adds_long_description_with_readme[README.rst-text/x-rst] tests/setup_cfg_fmt_test.py::test_adds_long_description_with_readme[README.markdown-text/markdown] tests/setup_cfg_fmt_test.py::test_adds_long_description_with_readme[README.md-text/markdown] tests/setup_cfg_fmt_test.py::test_adds_long_description_with_readme[README-text/plain] tests/setup_cfg_fmt_test.py::test_adds_long_description_with_readme[readme.txt-text/plain] tests/setup_cfg_fmt_test.py::test_readme_discover_prefers_file_over_directory tests/setup_cfg_fmt_test.py::test_sets_license_file_if_license_exists[LICENSE] tests/setup_cfg_fmt_test.py::test_sets_license_file_if_license_exists[LICENCE] tests/setup_cfg_fmt_test.py::test_sets_license_file_if_license_exists[LICENSE.md] tests/setup_cfg_fmt_test.py::test_sets_license_file_if_license_exists[license.txt] tests/setup_cfg_fmt_test.py::test_license_does_not_match_directories tests/setup_cfg_fmt_test.py::test_rewrite_sets_license_type_and_classifier tests/setup_cfg_fmt_test.py::test_rewrite_identifies_license tests/setup_cfg_fmt_test.py::test_python_requires_left_alone[already tests/setup_cfg_fmt_test.py::test_python_requires_left_alone[weird tests/setup_cfg_fmt_test.py::test_python_requires_left_alone[not tests/setup_cfg_fmt_test.py::test_strips_empty_options_and_sections[only tests/setup_cfg_fmt_test.py::test_strips_empty_options_and_sections[entire tests/setup_cfg_fmt_test.py::test_guess_python_requires_python2_tox_ini tests/setup_cfg_fmt_test.py::test_guess_python_requires_tox_ini_dashed_name tests/setup_cfg_fmt_test.py::test_guess_python_requires_ignores_insufficient_version_envs tests/setup_cfg_fmt_test.py::test_guess_python_requires_from_classifiers tests/setup_cfg_fmt_test.py::test_min_py3_version_updates_python_requires tests/setup_cfg_fmt_test.py::test_min_py3_version_greater_than_minimum tests/setup_cfg_fmt_test.py::test_min_version_removes_classifiers tests/setup_cfg_fmt_test.py::test_python_requires_with_patch_version tests/setup_cfg_fmt_test.py::test_classifiers_left_alone_for_odd_python_requires tests/setup_cfg_fmt_test.py::test_min_py3_version_less_than_minimum tests/setup_cfg_fmt_test.py::test_rewrite_extras tests/setup_cfg_fmt_test.py::test_imp_classifiers_from_tox_ini tests/setup_cfg_fmt_test.py::test_imp_classifiers_no_change tests/setup_cfg_fmt_test.py::test_imp_classifiers_pypy_only tests/setup_cfg_fmt_test.py::test_natural_sort