0

I have installed the latest windows 10 version of Git v 24 and use the standard recommended install as shown on a number of websites including https://zarkom.net/blogs/how-to-install-git-and-git-bash-on-windows-9140 he has said that his install recommends for vers 19 are still ok for v24 and just click on Next etc. I have had this confirmed with other help guides but on install I type in after the $ sign either python and or python3 and nothing happens but I can see when running a test file the bash:

/c/Users/nigel/AppData/Local/Microsoft/WindowsApps/python3: Permission denied

I don't have python3 installed there but in standard C:\Users\nigel\AppData\Local\Programs\Python. I have powershell running ok and am using Sublime Text 3 ok I can run code I prepare in Powershell version 5.6.. whatever it is now standard install part of Windows10. No issues running Python IDLE either. When I search the reg with regedit and type in git bash I cannot trace this odd link to Microsoft/*/Python as above but in that folder there is an odd link not seen previously not sure what installed that other than sometime ago I might have started an instll of python via M store but sure I didn't but this odd python language server may have got installed through something else? C:\Users\nigel\AppData\Local\Microsoft\Python Language Server\stubs.v1 is all I can find but in windowapps I found 0kb of a couple of files that are odd ie python.exe and python3.exe and size says 0kb. I cant seem to find how to amend git so that it stops looking in this odd location and looks in correct folder as stated above ie C:\Users\nigel\AppData\Local\Programs\Python I would appreciate any help although I am using powershell and ST3 ok on my python courses on UDEMY. I have tried to look at environmental path etc but cant see any reference to this odd path link with windowapps ? I have amended path ok previously for other editors or ensured that the path was pointing to correct python. The only other version of python I have is with Jupyter/ananconda but that is self contained my word ie it doesn't fire up unless I am in Anaconda or jupyter hope that makes sense which I use on another course ie bootcamp course

eftshift0
  • 26,375
  • 3
  • 36
  • 60
  • I guess what you would need to do (and I don't use Windows, so this is just *NIX background knowledge) is set up PATH variable to include the directory where the python executable is... that is, if you don't want to include a symbolic link to the python executable inside /usr/bin or /opt/usr/bin.... so, try this: `PATH=/c/Users/nigel/AppData/Local/Programs/Python python --version` and that should print the python version (maybe I'm missing a bin directory at the end of the PATH variable? Don't know... again, I don't use Windows so I have no idea what the layout inside the python directory is) – eftshift0 Nov 29 '19 at 17:21
  • Hi thanks for your response but I have already set up a Path variable where python is executable i.e.: – Nigel Warfield Nov 30 '19 at 12:42
  • I pressed enter/return before completing my path is in the windows already for python as c:\users\nigel\appdata\Programs\python\python38 BUT I see that I have also a path for this "errant" path of c:\users etc through to local\Microsoft\windowapps? I have typed in manually nigel@NigelBlanchard MINGW64 ~ $ PATH=/c/users/nige/appdata/local/programs/python/python38 python.exe bash: python.exe: command not found but I may not know enough of git commands I think that I should be able to alter something in env variable but not sure what I note that my env variable does contain cmd for git – Nigel Warfield Nov 30 '19 at 13:12
  • After the $ sign I have got for example a python file to run by simply typing python after the & eg. $ python hi.py assuming that file is on desktop and I have used cd etc to get to the desktop as git is opening up on home directory and hi.py runs and prints out hello world or whatever but if I type a badly formatted file such as ugly-code.py that I can open ok in ST3 but git does not allow me to run python as it will not open python as I can obviously in say powershell where I can simply type "py" and python3.8 runs ok and I can interact? – Nigel Warfield Nov 30 '19 at 13:42
  • The ugly-code.py runs badly indented in Sublime but will not open for example in Powershell So I am not sure how git is running python files but also why I cannot run python similar to the way I can run python in Powershell with >>>a – Nigel Warfield Nov 30 '19 at 13:45
  • https://stackoverflow.com/questions/32597209/python-not-working-in-the-command-line-of-git-bash This got me out of the issue I ended up just $ python -i got me the interactive prompt well its only taken me all morning to find that answer but all is well now !! All i need to do is learn how to create a file through the console so I can set up commands like touch Anyone know where I can decent grounding in using git successfully on windows10 until I have mastered the basics I dare not have ago at using github with git!! – Nigel Warfield Nov 30 '19 at 14:34
  • I got this sorted mostly I realised that if I type in python --version it points already to python 3.8.0 plus after the $ I now type python -I and that opens up interactive python and works ok Where is best place to start learning git commands I know the basics e.g ls cd etc rm etc but need to go further for my course? – Nigel Warfield Nov 30 '19 at 14:41

0 Answers0