We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pip install torchtext==0.7.0 installs incompatible PyTorch 1.7.0
## 🐛 Bug
**Describe the bug**
Recently, after I do `pip install torchtext==0.7.0`, import torchtext would cause segmentation fault. I found that degrading pytorch to 1.6.0 fixes this issue. 

**To Reproduce**
Steps to reproduce the behavior:
1. `pip install torchtext==0.7.0` (assuming that pytorch is not installed yet, and this command will install the latest pytorch)
2. python -c "import torchtext"

**Expected behavior**
Segmentation Fault

**Environment**

 - PyTorch Version (e.g., 1.0): 1.7.0
 - OS (e.g., Linux): Linux/MacOS
 - Python: 3.8.3

--- 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 #!/usr/bin/env python
2 import io
3 import os
4 import shutil
5 import subprocess
6 from pathlib import Path
7 import distutils.command.clean
8 from setuptools import setup, find_packages
9 
10 from build_tools import setup_helpers
11 
12 ROOT_DIR = Path(__file__).parent.resolve()
13 
14 
15 def read(*names, **kwargs):
16     with io.open(ROOT_DIR.joinpath(*names), encoding=kwargs.get("encoding", "utf8")) as fp:
17         return fp.read()
18 
19 
20 def _get_version():
21     version = '0.9.0a0'
22     sha = None
23 
24     try:
25         cmd = ['git', 'rev-parse', 'HEAD']
26         sha = subprocess.check_output(cmd, cwd=str(ROOT_DIR)).decode('ascii').strip()
27     except Exception:
28         pass
29 
30     if os.getenv('BUILD_VERSION'):
31         version = os.getenv('BUILD_VERSION')
32     elif sha is not None:
33         version += '+' + sha[:7]
34 
35     if sha is None:
36         sha = 'Unknown'
37     return version, sha
38 
39 
40 def _export_version(version, sha):
41     version_path = ROOT_DIR / 'torchtext' / 'version.py'
42     with open(version_path, 'w') as fileobj:
43         fileobj.write("__version__ = '{}'\n".format(version))
44         fileobj.write("git_version = {}\n".format(repr(sha)))
45 
46 
47 VERSION, SHA = _get_version()
48 _export_version(VERSION, SHA)
49 
50 print('-- Building version ' + VERSION)
51 
52 
53 class clean(distutils.command.clean.clean):
54     def run(self):
55         # Run default behavior first
56         distutils.command.clean.clean.run(self)
57 
58         # Remove torchtext extension
59         for path in (ROOT_DIR / 'torchtext').glob('**/*.so'):
60             print(f'removing \'{path}\'')
61             path.unlink()
62         # Remove build directory
63         build_dirs = [
64             ROOT_DIR / 'build',
65             ROOT_DIR / 'third_party' / 'build',
66         ]
67         for path in build_dirs:
68             if path.exists():
69                 print(f'removing \'{path}\' (and everything under it)')
70                 shutil.rmtree(str(path), ignore_errors=True)
71 
72 
73 setup_info = dict(
74     # Metadata
75     name='torchtext',
76     version=VERSION,
77     author='PyTorch core devs and James Bradbury',
78     author_email='jekbradbury@gmail.com',
79     url='https://github.com/pytorch/text',
80     description='Text utilities and datasets for PyTorch',
81     long_description=read('README.rst'),
82     license='BSD',
83 
84     install_requires=[
85         'tqdm', 'requests', 'torch', 'numpy'
86     ],
87     python_requires='>=3.5',
88     classifiers=[
89         'Programming Language :: Python :: 3',
90         'Programming Language :: Python :: 3.5',
91         'Programming Language :: Python :: 3.6',
92         'Programming Language :: Python :: 3.7',
93         'Programming Language :: Python :: 3.8',
94         'Programming Language :: Python :: 3 :: Only',
95     ],
96     # Package info
97     packages=find_packages(exclude=('test*', 'build_tools*')),
98     zip_safe=False,
99     # Extension info
100     # If you are trying to use torchtext.so and see no registered op.
101     # See here: https://github.com/pytorch/vision/issues/2134"
102     ext_modules=setup_helpers.get_ext_modules(),
103     cmdclass={
104         'build_ext': setup_helpers.BuildExtension.with_options(no_python_abi_suffix=True),
105         'clean': clean,
106     },
107 )
108 
109 setup(**setup_info)
110
```
--- 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()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -49,6 +49,12 @@
 
 print('-- Building version ' + VERSION)
 
+pytorch_package_version = os.getenv('PYTORCH_VERSION')
+
+pytorch_package_dep = 'torch'
+if pytorch_package_version is not None:
+    pytorch_package_dep += "==" + pytorch_package_version
+
 
 class clean(distutils.command.clean.clean):
     def run(self):
@@ -82,7 +88,7 @@
     license='BSD',
 
     install_requires=[
-        'tqdm', 'requests', 'torch', 'numpy'
+        'tqdm', 'requests', pytorch_package_dep, 'numpy'
     ],
     python_requires='>=3.5',
     classifiers=[

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -49,6 +49,12 @@\n \n print('-- Building version ' + VERSION)\n \n+pytorch_package_version = os.getenv('PYTORCH_VERSION')\n+\n+pytorch_package_dep = 'torch'\n+if pytorch_package_version is not None:\n+    pytorch_package_dep += \"==\" + pytorch_package_version\n+\n \n class clean(distutils.command.clean.clean):\n     def run(self):\n@@ -82,7 +88,7 @@\n     license='BSD',\n \n     install_requires=[\n-        'tqdm', 'requests', 'torch', 'numpy'\n+        'tqdm', 'requests', pytorch_package_dep, 'numpy'\n     ],\n     python_requires='>=3.5',\n     classifiers=[\n", "issue": "pip install torchtext==0.7.0 installs incompatible PyTorch 1.7.0\n## \ud83d\udc1b Bug\r\n**Describe the bug**\r\nRecently, after I do `pip install torchtext==0.7.0`, import torchtext would cause segmentation fault. I found that degrading pytorch to 1.6.0 fixes this issue. \r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. `pip install torchtext==0.7.0` (assuming that pytorch is not installed yet, and this command will install the latest pytorch)\r\n2. python -c \"import torchtext\"\r\n\r\n**Expected behavior**\r\nSegmentation Fault\r\n\r\n**Environment**\r\n\r\n - PyTorch Version (e.g., 1.0): 1.7.0\r\n - OS (e.g., Linux): Linux/MacOS\r\n - Python: 3.8.3\n", "before_files": [{"content": "#!/usr/bin/env python\nimport io\nimport os\nimport shutil\nimport subprocess\nfrom pathlib import Path\nimport distutils.command.clean\nfrom setuptools import setup, find_packages\n\nfrom build_tools import setup_helpers\n\nROOT_DIR = Path(__file__).parent.resolve()\n\n\ndef read(*names, **kwargs):\n    with io.open(ROOT_DIR.joinpath(*names), encoding=kwargs.get(\"encoding\", \"utf8\")) as fp:\n        return fp.read()\n\n\ndef _get_version():\n    version = '0.9.0a0'\n    sha = None\n\n    try:\n        cmd = ['git', 'rev-parse', 'HEAD']\n        sha = subprocess.check_output(cmd, cwd=str(ROOT_DIR)).decode('ascii').strip()\n    except Exception:\n        pass\n\n    if os.getenv('BUILD_VERSION'):\n        version = os.getenv('BUILD_VERSION')\n    elif sha is not None:\n        version += '+' + sha[:7]\n\n    if sha is None:\n        sha = 'Unknown'\n    return version, sha\n\n\ndef _export_version(version, sha):\n    version_path = ROOT_DIR / 'torchtext' / 'version.py'\n    with open(version_path, 'w') as fileobj:\n        fileobj.write(\"__version__ = '{}'\\n\".format(version))\n        fileobj.write(\"git_version = {}\\n\".format(repr(sha)))\n\n\nVERSION, SHA = _get_version()\n_export_version(VERSION, SHA)\n\nprint('-- Building version ' + VERSION)\n\n\nclass clean(distutils.command.clean.clean):\n    def run(self):\n        # Run default behavior first\n        distutils.command.clean.clean.run(self)\n\n        # Remove torchtext extension\n        for path in (ROOT_DIR / 'torchtext').glob('**/*.so'):\n            print(f'removing \\'{path}\\'')\n            path.unlink()\n        # Remove build directory\n        build_dirs = [\n            ROOT_DIR / 'build',\n            ROOT_DIR / 'third_party' / 'build',\n        ]\n        for path in build_dirs:\n            if path.exists():\n                print(f'removing \\'{path}\\' (and everything under it)')\n                shutil.rmtree(str(path), ignore_errors=True)\n\n\nsetup_info = dict(\n    # Metadata\n    name='torchtext',\n    version=VERSION,\n    author='PyTorch core devs and James Bradbury',\n    author_email='jekbradbury@gmail.com',\n    url='https://github.com/pytorch/text',\n    description='Text utilities and datasets for PyTorch',\n    long_description=read('README.rst'),\n    license='BSD',\n\n    install_requires=[\n        'tqdm', 'requests', 'torch', 'numpy'\n    ],\n    python_requires='>=3.5',\n    classifiers=[\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n        'Programming Language :: Python :: 3 :: Only',\n    ],\n    # Package info\n    packages=find_packages(exclude=('test*', 'build_tools*')),\n    zip_safe=False,\n    # Extension info\n    # If you are trying to use torchtext.so and see no registered op.\n    # See here: https://github.com/pytorch/vision/issues/2134\"\n    ext_modules=setup_helpers.get_ext_modules(),\n    cmdclass={\n        'build_ext': setup_helpers.BuildExtension.with_options(no_python_abi_suffix=True),\n        'clean': clean,\n    },\n)\n\nsetup(**setup_info)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\nimport io\nimport os\nimport shutil\nimport subprocess\nfrom pathlib import Path\nimport distutils.command.clean\nfrom setuptools import setup, find_packages\n\nfrom build_tools import setup_helpers\n\nROOT_DIR = Path(__file__).parent.resolve()\n\n\ndef read(*names, **kwargs):\n    with io.open(ROOT_DIR.joinpath(*names), encoding=kwargs.get(\"encoding\", \"utf8\")) as fp:\n        return fp.read()\n\n\ndef _get_version():\n    version = '0.9.0a0'\n    sha = None\n\n    try:\n        cmd = ['git', 'rev-parse', 'HEAD']\n        sha = subprocess.check_output(cmd, cwd=str(ROOT_DIR)).decode('ascii').strip()\n    except Exception:\n        pass\n\n    if os.getenv('BUILD_VERSION'):\n        version = os.getenv('BUILD_VERSION')\n    elif sha is not None:\n        version += '+' + sha[:7]\n\n    if sha is None:\n        sha = 'Unknown'\n    return version, sha\n\n\ndef _export_version(version, sha):\n    version_path = ROOT_DIR / 'torchtext' / 'version.py'\n    with open(version_path, 'w') as fileobj:\n        fileobj.write(\"__version__ = '{}'\\n\".format(version))\n        fileobj.write(\"git_version = {}\\n\".format(repr(sha)))\n\n\nVERSION, SHA = _get_version()\n_export_version(VERSION, SHA)\n\nprint('-- Building version ' + VERSION)\n\npytorch_package_version = os.getenv('PYTORCH_VERSION')\n\npytorch_package_dep = 'torch'\nif pytorch_package_version is not None:\n    pytorch_package_dep += \"==\" + pytorch_package_version\n\n\nclass clean(distutils.command.clean.clean):\n    def run(self):\n        # Run default behavior first\n        distutils.command.clean.clean.run(self)\n\n        # Remove torchtext extension\n        for path in (ROOT_DIR / 'torchtext').glob('**/*.so'):\n            print(f'removing \\'{path}\\'')\n            path.unlink()\n        # Remove build directory\n        build_dirs = [\n            ROOT_DIR / 'build',\n            ROOT_DIR / 'third_party' / 'build',\n        ]\n        for path in build_dirs:\n            if path.exists():\n                print(f'removing \\'{path}\\' (and everything under it)')\n                shutil.rmtree(str(path), ignore_errors=True)\n\n\nsetup_info = dict(\n    # Metadata\n    name='torchtext',\n    version=VERSION,\n    author='PyTorch core devs and James Bradbury',\n    author_email='jekbradbury@gmail.com',\n    url='https://github.com/pytorch/text',\n    description='Text utilities and datasets for PyTorch',\n    long_description=read('README.rst'),\n    license='BSD',\n\n    install_requires=[\n        'tqdm', 'requests', pytorch_package_dep, 'numpy'\n    ],\n    python_requires='>=3.5',\n    classifiers=[\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n        'Programming Language :: Python :: 3 :: Only',\n    ],\n    # Package info\n    packages=find_packages(exclude=('test*', 'build_tools*')),\n    zip_safe=False,\n    # Extension info\n    # If you are trying to use torchtext.so and see no registered op.\n    # See here: https://github.com/pytorch/vision/issues/2134\"\n    ext_modules=setup_helpers.get_ext_modules(),\n    cmdclass={\n        'build_ext': setup_helpers.BuildExtension.with_options(no_python_abi_suffix=True),\n        'clean': clean,\n    },\n)\n\nsetup(**setup_info)\n", "path": "setup.py"}]}