View the version and installation location of Python and NumPy under the command line
1. View Python version
Method One:
Python-v
Note: '-V ' in uppercase, only one '-'
Method Two:
Python--version
Note: There are two '-' in '--version '
2. View Python installation location
Method One:
Python-c "Import sys; Print Sys.executable "
Method Two:
Python-c "Import os; Print Os.sys.executable "
Python-c "Import os; Path = Os.sys.executable;folder=path[0:path.rfind (OS.SEP)]; Print Folder "
3. View NumPy version
Python-c "Import numpy; Print Numpy.version.version "
Or
Python-c "Import numpy; Print numpy.__version__ "
4. View NumPy Installation path
Python-c "Import numpy; Print numpy.__file__ "
Note: Depending on how you view the NumPy version and installation path, you can view additional Python package versions and installation paths
View the version and installation location of Python and NumPy under the command line