Python Forum
Installing and using Python on windows has become a 2 week long nightmare
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing and using Python on windows has become a 2 week long nightmare
#1
NT - Problem resolved - user error
Reply
#2
(Jul-03-2021, 04:21 PM)ogg130 Wrote: Windows 10.

I run python3 from git bash or command prompt. Hey look, it's great and everything works!

I run a simple hello world script by running 'python scriptname.py', it seems to run, but doesnt return any output.
  • I've disabled the horseshit windows store bs.
  • I tried responsed from multiple stackoverflow threads telling me to change registry keys that dont exist.
  • I have validated and checked that the python exceutable is in my path and that the executable exists where specified in the path.
  • I have uninstalled and reinstalled python with reboots in between mulitple times.
  • I have added PYTHONPATH and PYTHONHOME at peoples suggestion, and removed them because people said they never should be used in Windows and just caused errors anyways.
  • I have removed and changed the shebang in the script per stackoverflow selections.
  • I have looked for installation documentation on Python.org and cant find anything that helps.

Nothing works. Why is this so difficult and what can I do to get through this?

Thank you in advance for helping me understand why this simple task is proving to be not simple.
Reply
#3
Look at Python 3.9/3.8 and pip installation under Windows
(Jul-03-2021, 04:24 PM)ogg130 Wrote: I run a simple hello world script by running 'python scriptname.py', it seems to run, but doesnt return any output.
You test as in link python -V and and pip -V
C:\Users\Tom>python -V
Python 3.9.5

C:\Users\Tom>python -c "import sys; print(sys.executable)"
C:\python39\python.exe

C:\Users\Tom>pip -V
pip 21.1.3 from c:\python39\lib\site-packages\pip (python 3.9)

C:\Users\Tom>
Why this work has only to do with that Environment Variables Path is set to Python 3.9.
[Image: WfreEG.png]
I had changed to C:\python37 and C:\python37\Scripts then it would use Python 3.7 when to python -V

So then main version that use most should always be set like this,
i have a lot version Anaconda/Miniconda/PyPY...ect ,all version python.org can be access bye using py(Python install put a py.exe in the Windows folder).
C:\Users\Tom>py -2.7 -V
Python 2.7.9

C:\Users\Tom>py -3.4 -V
Python 3.4.2

C:\Users\Tom>py -3.6 -V
Python 3.6.4

C:\Users\Tom>py -3.7 -m pip install requests
Requirement already satisfied: requests in c:\python37\lib\site-packages (2.22.0
Reply
#4
Download the Python Installer binaries. Open the official Python website in your web browser. Navigate to the Downloads tab for Windows. Choose the latest Python 3 release.
Run the Executable Installer. Once the installer is downloaded, run the Python installer. Check the Install launcher for all users check box.
Add Python to environmental variables. The last (optional) step in the installation process is to add Python Path to the System Environment variables.
Verify the Python Installation. You have now successfully installed Python 3.7.3 on Windows 10.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Installing auto-sklearn on Windows 10 Led_Zeppelin 1 2,832 Apr-13-2021, 03:08 AM
Last Post: snippsat
  opening python from the command line takes a long time to load? abdulkaderanwar 4 2,912 Jun-22-2020, 03:42 AM
Last Post: abdulkaderanwar

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020