View the version and installation location of Python and NumPy under the command line

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.