<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Comparing the output of pip in the magical venv that can run the alexnet_based and a fresh install that can't. Have saved both of these to different text files
Step1:  Comparing line by line by eye is a bit annoying, so using Python
Step2:  Then we can just use sets to compare
Step3:  Installing just those in the fresh and trying again. Installing in this order
Step4:  installed pyparsing
Step5:  installed pytz
Step6:  installed terminado==0.4
Step7:  installed matplotlib
Step8:  installed param
Step9:  installed holoviews
<ASSISTANT_TASK:>
Python Code:
cd ..
!cat magical.freeze
!cat fresh.freeze
Explanation: Comparing the output of pip in the magical venv that can run the alexnet_based and a fresh install that can't. Have saved both of these to different text files:
End of explanation
magical = []
with open("magical.freeze") as f:
    for l in f:
        magical.append(l)
fresh = []
with open("fresh.freeze") as f:
    for l in f:
        fresh.append(l)
Explanation: Comparing line by line by eye is a bit annoying, so using Python:
End of explanation
set(magical) - set(fresh)
Explanation: Then we can just use sets to compare:
End of explanation
fresh = []
with open("fresh.freeze") as f:
    for l in f:
        fresh.append(l)
set(magical) - set(fresh)
Explanation: Installing just those in the fresh and trying again. Installing in this order:
installed mock: errors
End of explanation
fresh = []
with open("fresh.freeze") as f:
    for l in f:
        fresh.append(l)
set(magical) - set(fresh)
Explanation: installed pyparsing: errors
End of explanation
fresh = []
with open("fresh.freeze") as f:
    for l in f:
        fresh.append(l)
set(magical) - set(fresh)
Explanation: installed pytz: errors
End of explanation
fresh = []
with open("fresh.freeze") as f:
    for l in f:
        fresh.append(l)
set(magical) - set(fresh)
Explanation: installed terminado==0.4: errors
End of explanation
fresh = []
with open("fresh.freeze") as f:
    for l in f:
        fresh.append(l)
set(magical) - set(fresh)
Explanation: installed matplotlib: errors
End of explanation
fresh = []
with open("fresh.freeze") as f:
    for l in f:
        fresh.append(l)
set(magical) - set(fresh)
Explanation: installed param: errors
End of explanation
fresh = []
with open("fresh.freeze") as f:
    for l in f:
        fresh.append(l)
set(magical) - set(fresh)
Explanation: installed holoviews: errors
End of explanation
<END_TASK>