Reputation: 491
I installed a program with pip (e.g. simple-plotter) in windows using the following command:
py -m pip install simple-plotter
How do I run the program I installed? In Linux, I can just type the command in a terminal, but if I type in windows, I get a "not recognized as an internal or external command" or if I run in Python I get a "No module named" error.
Upvotes: 17
Views: 29207
Reputation: 4224
If you've installed a package via the Windows Store version of Python, try using:
pip show <package>
(Where <package>
is the package you installed).
Then it should include the following:
Location: C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python<some_text>\LocalCache\local-packages\Python<version>\site-packages
Make sure to change the end of the path (\site-packages
) to \Scripts
Once you have this path, follow the other answer.
TIP: A quick shortcut to get to your environment variables is to search up "environment":
Upvotes: 11
Reputation: 384
I think the error occurs because the Scripts folder is not on PATH in the environment variables, while in Linux it probably is (I don't know a lot of Linux so I don't know how environment variables work there, anyway):
the best way to solve this is by adding the Scripts python folder to PATH:
In my case it is C:\Users\MyUser\AppData\Local\Programs\Python\Python37-32\Scripts
So, press WIN(windows key) + PAUSE_BREAK(near print screen key)
Then click on Advanced System Configuration
(Sorry if it's not accurate, my system is in portuguese)
After that click in Environment Variables
Then, select Path
and click edit
Click in new, add the path and hit the OKs
Upvotes: 9
Reputation: 847
According to https://pypi.org/project/simple-plotter/0.2.2/
python -m simple_plotter.gui
So maybe on windows
py -m simple_plotter.gui
Upvotes: 4