pip install tkinter
pip install PIL
pip install openpyxl
I want with one command all of these to be installed on any PC via the command prompt or python shell.
How can I do this?
pip install tkinter
pip install PIL
pip install openpyxl
I want with one command all of these to be installed on any PC via the command prompt or python shell.
How can I do this?
You would just do:
pip install tkinter PIL openpyxl
except that - as acw1668 points out - you cannot install tkinter
using pip. So that would then be:
pip install PIL openpyxl
Or you can put them, one per line, in a file called requirements.txt and execute:
pip install -r requirements.txt
As mentioned by Ceres, you can use the following to put currently-installed packages into the file:
pip freeze > requirements.txt
To install from the python prompt, take a look at Installing python module within code
You're still left with the problem of how to install tkinter
. Instructions for several different OSs are here: Install tkinter for Python
You could combine the answers and use a subprocess to install python-tk
from within python.
PS Consider pillow over PIL:
pip install Pillow