I'm trying to create a batch file to run a Python script I wrote and ran into some hurdles:
- I need to ensure that end user has matplotlib-3.1.1 or later installed so I have a command:
C:\ProgramData\Anaconda3\python.exe -m pip freeze | findstr matplotlib
But this comes up with an output:
WARNING: Could not generate requirement for distribution -atplotlib 2.2.2 (c:\pr
ogramdata\anaconda3\lib\site-packages): Parse error at "'-atplotl'": Expected W:
(abcd...)
matplotlib==3.1.1
matplotlib-venn==0.11.5
So the question is: how can I search for a very specific package rather than anything that roughly matches search key?
- If user's version of matplotlib is older than what is required I want to have the latest version installed automatically. How can I send the output of version check (above) to some variable to be used in if clause?
Thanks in advance!