0

I am trying to setup my system for Django and Python online coruse. Here are the setup instructions: https://www.codingforentrepreneurs.com/blog/install-python-django-on-windows/.

I've had Python previosly installed and I have been using it with Pycharm, so I figured I can skip the first two steps on the instructions. However on step "3. Verify Python Installed in Powershell" my powershell says this on my systems language (here translated by myself, but not a good translation):

Python was not found. Install it from Microsoft store by executing it without arguments or remove this shortcut in Settings > Manage application performance tokens.

I think it means that I don't have Python on windows, even though I use it almost everyday with Pycharm. I also use Github straigth from Pycharm if that makes a difference.

I originaly installed Python and Pycharm by the instruction of this Youtube video https://www.youtube.com/watch?v=rfscVS0vtbw, which I followed blindly and I actually didin't have any idea what I was doing (still don't). I fear that if I reinstal Python (Steps 1 and 2) I will mess something up with my existing projects.

So does anyone have Idea why I can't see my Python version on the powershell?

Edit: The problem was that python was not on Path. Once I fixed that everything else went more or less smoothly.

7
  • 1
    SU has rules: How to ask, as does it's sister sites, like SO: Provide MRE --- How to ask --- Don't ask --- Proper Topic --- Why not upload images of code/errors?
    – postanote
    Commented Dec 13, 2020 at 23:48
  • 1
    This is not a PowerShell code question, which is what we are here to help with. This is a system configuration issue. So, really off-topic for SU/SO, etc. Never do stuff blindly. You can/will severely impact/destroy your system or working environment. The error message, 'Python was not found', is really specific. You do not have Python in your System and Powershell paths and if it is not, it will not be found by anything.
    – postanote
    Commented Dec 13, 2020 at 23:50
  • 1
    that usually means you have a problem with your path statement. open a PoSh console and enter ($env:Path).Split(';') to see your path values. if python is NOT in that list ... then that is the problem.
    – Lee_Dailey
    Commented Dec 14, 2020 at 11:40
  • Thanks for all of your comments, even though it is apparently in the wrong site. It could be that Python is not on the path. I'll look more into that. For future could someone clarify what stack exchange site this question belongs to. I am quite new to all of this.
    – Heikki
    Commented Dec 14, 2020 at 14:46
  • This is the correct site, don't worry about it. StackExchange is not powershell-specific. Assuming your paths look correct, are you able to run python -v from cmd instead of powershell? Try python.exe -v in powershell, and also try c:\path\to\python.exe -v to check for some misconfigured environment things.
    – Cpt.Whale
    Commented Dec 14, 2020 at 16:53

2 Answers 2

1

Possibly because after python 3.3 intended command is not python, but simply py
Detailed explanation here

And short answer to your question:
check if powershell command py -0p --list-paths finds any versions.

-1

I am using Windows 11, Python3.10 and Laptop, and Windows Powershell cannot show Python version (command: python --version).

Solution: type Python inside Windows Powershell, it will prompt out Microsoft Store, just click "get", wait to finish the process, then go to Windows Powershell, type "python --version", it can show the Python version.

1
  • This doesn't work like you think it works. It you type python and you get the message that it's not installed, then it means whatever version you have installed isn't "visible" for PowerShell. You can install it from MS Store and it will "work", but it will give you the version that you have just installed, not the one you already had. You'll be left with two Pythons without understanding which one is used when and it will only lead to more issues down the road.
    – gronostaj
    Commented Jan 16, 2023 at 20:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .