Try
import sys
print(sys.version)
This prints the full version information string. If you only want the python version number, then Bastien LĂ©onard’s solution is the best. You might want to examine the full string and see if you need it or portions of it.
More Related Contents:
- Calling one method from another within same class in Python
- Python: Disable images in Selenium Google ChromeDriver
- Split text after the second occurrence of character
- Apply function to each row of pandas dataframe to create two new columns
- Unable to parse TAB in JSON files
- sklearn : TFIDF Transformer : How to get tf-idf values of given words in document
- Regex and unicode
- How to parse complex text files using Python?
- Django – New fonts?
- Topic distribution: How do we see which document belong to which topic after doing LDA in python
- Creating a numpy array of 3D coordinates from three 1D arrays
- pyodbc the sql contains 0 parameter markers but 1 parameters were supplied’ ‘hy000’
- Wait the end of subprocesses with multiple parallel jobs
- Improve performance of converting numpy array to MATLAB double
- Parse currency into numbers in Python
- Why does a set display in same order if sets are unordered?
- How do I plot a Keras/Tensorflow subclassing API model?
- A more pythonic way to define an enum with dynamic members
- Is there an effiecient way of making a function to drag and drop multiple png’s?
- Upload file with Selenium Webdriver Python
- Pyinstaller created exe file can not load a keras nn model
- java.io.IOException: Cannot run program “python” using Spark in Pycharm (Windows)
- TypeError: Descriptors cannot not be created directly
- Python BeautifulSoup give multiple tags to findAll
- update django database to reflect changes in existing models
- Use wildcard with os.path.isfile()
- matplotlib has no attribute ‘pyplot’
- NumPy append vs Python append
- Automatically growing lists in Python
- What is the difference between spark-submit and pyspark?