The error message you're seeing is in Polish, and it translates to:
"Python not found; run without arguments to install"
This means your system can't find the python command, even though we verified pip was working earlier. This is a common issue on Windows.
Here's how to fix it:
Solution 1: Use py Instead of python
On Windows, sometimes the command python isn't recognized, but py is. Try this:
- Open Command Prompt.
- Navigate to your Desktop (you've already done this):
cd Desktop
- Run your script using
py instead of python:
py test.py
This should work because py is the Python launcher for Windows.
Solution 2: Run Python from the Full Path
If py doesn't work, let's use the full path to Python (we already found this path earlier):
- Go back to the Command Prompt.
- Type the following (adjust the path if yours is different):
C:\Users\YourUsername\AppData\Local\Programs\Python\PythonXX\python.exe test.py
Replace:
YourUsername with your actual Windows username (e.g., brtsz).
PythonXX with your Python version folder (e.g., Python39, Python310).
Example:
C:\Users\brtsz\AppData\Local\Programs\Python\Python39\python.exe test.py
Solution 3: Add Python to PATH (Permanent Fix)
If the above solutions work, let's make python work globally:
- Open Environment Variables:
- Press
Win + S, type "Environment Variables," and select Edit the system environment variables.
- Edit the PATH Variable:
- Save and Restart Command Prompt:
- Click OK on all windows.
- Close and reopen Command Prompt.
- Try running your script again:
python test.py
What to Expect After Fixing
Once it works, you should see:
Requests version: 2.28.2
BeautifulSoup version: 4.11.1
Now you're all set! You can run any Python script using:
py your_script.py
or
python your_script.py
Let me know if any of these solutions work for you! 😊