Python Forum
Error while trying to see Python version with "sys.executable"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error while trying to see Python version with "sys.executable"
#4
(Feb-08-2020, 07:57 PM)Axel_Erfurt Wrote:
import sys

print(sys.version)
print(sys.path)

Thank you very much for your reply. I did notice what sys.version outputs, but what is causing the error "'C:\Users\<User>' is not recognized as an internal or external command, operable program or batch file." when I do !{sys.executable} --version? Isn't that supposed to be a correct path, that one in which I have pythonw.exe?

Is there another difference between !python --version and sys.version?

Thanks again.
Reply


Messages In This Thread
RE: Error while trying to see Python version with "sys.executable" - by karkas - Feb-08-2020, 11:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  run part of a script with a different version of Python jdog 2 452 Jan-09-2024, 08:49 PM
Last Post: jdog
  How to find out from outside Python (in Windows) the current version of Python? pstein 4 743 Oct-04-2023, 10:01 AM
Last Post: snippsat
  How to resolve version conflicts in Python? taeefnajib 0 923 Apr-27-2023, 08:37 PM
Last Post: taeefnajib
  Python venv and PIP version issue JanOlvegg 2 1,270 Feb-22-2023, 02:22 AM
Last Post: JanOlvegg
  Python Version upgrade nitinkukreja 1 903 Feb-04-2023, 10:27 PM
Last Post: Larz60+
  Can't update new python version on Pycharm GOKUUUU 6 3,836 Jul-23-2022, 09:24 PM
Last Post: GOKUUUU
  How to compile a Python script for a Windows / Linux executable? netanelst 2 1,333 May-24-2022, 07:02 AM
Last Post: netanelst
  Building python (3.9.5) with different libexpat version (2.4.6) raghupcr 0 1,312 Feb-25-2022, 11:29 AM
Last Post: raghupcr
  Python keeps running the old version of the code quest 2 3,766 Jan-20-2022, 07:34 AM
Last Post: ThiefOfTime
  Python executable Script (Wrapper) Hwang 2 1,892 Jan-12-2022, 06:53 PM
Last Post: Hwang

Forum Jump:

User Panel Messages

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