I had two versions of Python, with Anaconda, installed in my Mac, 3.5 and 3.7. Is there any way to know what packages I had installed in 3.5 that are not in 3.7, like those that you can install with pip (pulp, wordcloud, and alike).
What I have tried so far is using command line with this:
diff -rq anaconda/.../python3.5/site-packages anaconda3/.../python3.7/site-packages
This shows the differences between the directories but shows a lot of information of repeated packages and core modules. How can I find the differences in packages between two Anaconda versions?
You can list all the packages installed under a specific environment using conda list
. Also, you can export the list to a file with the flag --export
.
For example, if your environments are named python3
and pytorch_p36
, you can do the following:
conda list -n python3 --export > python3-packages.txt
conda list -n pytorch_p36 --export > pytorch_p36-packages.txt
diff python3-packages.txt pytorch_p36-packages.txt
The command also accepts the flag --json
, which will export the data in a json format, suitable for automatic processing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With