data = open('requirements-prod.pip', 'r')
data2 = open('requirements-prod-no-version.pip', 'w')
for line in data.readlines():
    new_line = line[:line.index('==')]
data2.write(new_line + '\n')
Upgrade python packages from requirements.txt using pip command