
from setuptools.command import easy_install

requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]

for module in requires:
    easy_install.main( ["-U",module] )


import subprocess
import sys

requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]

def install(package):
    subprocess.call([sys.executable, "-m", "pip", "install", package])

for module in requires:
    install(module)

Use pip instead of easy_install
Use pip instead of easy_install

  
- from setuptools.command import easy_install
+ import subprocess
+ import sys
  
  requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]
  
+ def install(package):
+     subprocess.call([sys.executable, "-m", "pip", "install", package])
+ 
  for module in requires:
-     easy_install.main( ["-U",module] )
+     install(module)
  
Use pip instead of easy_install
## Code Before:

from setuptools.command import easy_install

requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]

for module in requires:
    easy_install.main( ["-U",module] )

## Instruction:
Use pip instead of easy_install
## Code After:

import subprocess
import sys

requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]

def install(package):
    subprocess.call([sys.executable, "-m", "pip", "install", package])

for module in requires:
    install(module)
