Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings

Cover Image for Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings
Matheus Mello
Matheus Mello
published a few days ago. updated a few hours ago

🐍💻🔍🚫 You're excited to download a fancy Graphical User Interface (GUI) for your project. But as you type the command to install it, the terminal throws you a curveball with an error message:

"Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases."

What's happening? 😱 Don't worry, I've got you covered with an easy solution! 🤗

The Problem

The error message suggests that Python is not installed or cannot be found on your computer. This can happen due to various reasons, such as:

  1. Python is not installed on your system.

  2. Python is installed, but the terminal doesn't recognize it.

  3. The Python installation directory is not added to the system's PATH variable.

  4. The terminal shortcut is configured incorrectly.

The Solution

Let's break down the possible solutions for each of these issues.

1. Python is not installed on your system

To check if Python is installed on your computer, open the terminal (Command Prompt, PowerShell, or any other terminal you prefer) and type:

python --version

If Python is not installed, you'll see an error similar to "python: command not found." In this case, you need to install Python.

Head over to the official Python website at python.org and download the latest version of Python suitable for your operating system. Follow the installation instructions provided and make sure to add Python to the PATH variable during installation.

After the installation is complete, open the terminal again and recheck the Python version to ensure it's installed correctly.

2. Terminal doesn't recognize Python

If Python is installed but the terminal still doesn't recognize it, it might be due to the incorrect configuration of the system's PATH variable.

To fix this, you need to add the Python installation directory to the PATH variable manually:

  1. Find the installation directory of Python. It is usually located in C:\Program Files\PythonX.X or C:\PythonX.X, where X.X represents the version number.

  2. Right-click on the "Start" button, and select "System" or "System Properties."

  3. Go to "Advanced system settings" -> "Environment Variables."

  4. Under "System variables," scroll down and find the "Path" variable. Select it and click "Edit."

  5. Click "New" and add the path to the Python installation directory. For example, C:\PythonX.X.

  6. Click "OK" to save the changes.

Now, reopen the terminal and check if the Python version is recognized. If it still doesn't work, try restarting your computer.

3. Terminal shortcut is configured incorrectly

In some cases, the terminal shortcut might be configured incorrectly, leading to the error message you encountered.

To fix this:

  1. Go to "Settings" on your computer.

  2. Look for "Manage App Execution Aliases" (or a similar option, depending on your operating system).

  3. Disable the "python" alias or shortcut if it's enabled.

After making these changes, try running the command again in the terminal, and see if the error message persists.

Call-To-Action

Now that you've got Python up and running, it's time to explore the exciting world of GUI programming! 🚀 Whether you're creating a desktop application or a web interface, Python offers a wide range of powerful libraries and frameworks, such as PyQt, Tkinter, and Django, to unleash your creativity.

Don't let any tech hurdles stand in the way of your coding journey. 🔥 If you have any questions or face any other challenges, feel free to reach out to our community or leave a comment below. We're here to help! 👩‍💻👨‍💻

Share this post with your fellow Pythonistas and let them join the GUI revolution! 🙌🌟

Happy coding! 💻😃


More Stories

Cover Image for How can I echo a newline in a batch file?

How can I echo a newline in a batch file?

updated a few hours ago
batch-filenewlinewindows

🔥 💻 🆒 Title: "Getting a Fresh Start: How to Echo a Newline in a Batch File" Introduction: Hey there, tech enthusiasts! Have you ever found yourself in a sticky situation with your batch file output? We've got your back! In this exciting blog post, we

Matheus Mello
Matheus Mello
Cover Image for How do I run Redis on Windows?

How do I run Redis on Windows?

updated a few hours ago
rediswindows

# Running Redis on Windows: Easy Solutions for Redis Enthusiasts! 🚀 Redis is a powerful and popular in-memory data structure store that offers blazing-fast performance and versatility. However, if you're a Windows user, you might have stumbled upon the c

Matheus Mello
Matheus Mello
Cover Image for Best way to strip punctuation from a string

Best way to strip punctuation from a string

updated a few hours ago
punctuationpythonstring

# The Art of Stripping Punctuation: Simplifying Your Strings 💥✂️ Are you tired of dealing with pesky punctuation marks that cause chaos in your strings? Have no fear, for we have a solution that will strip those buggers away and leave your texts clean an

Matheus Mello
Matheus Mello
Cover Image for Purge or recreate a Ruby on Rails database

Purge or recreate a Ruby on Rails database

updated a few hours ago
rakeruby-on-railsruby-on-rails-3

# Purge or Recreate a Ruby on Rails Database: A Simple Guide 🚀 So, you have a Ruby on Rails database that's full of data, and you're now considering deleting everything and starting from scratch. Should you purge the database or recreate it? 🤔 Well, my

Matheus Mello
Matheus Mello