How does python judge the module installation is complete

To determine whether a module is installed, it is very simple, enter python in the terminal, and then enter the import module name. Then if the installation is successful without any prompt, the next

If you are prompted to report an error, it means there is a problem.

E.g

import re

You can see that the above program does not report an error, indicating that the re module has been installed

And for some modules, in addition to import, there are special test methods to test whether all the methods in the module can run normally, such as numpy and scipy, it is possible

The module is successfully installed, but some files fail to compile and some methods cannot be used. These modules will write their test methods in the documentation. Such as numpy.test() and so on.

Knowledge point expansion:

**Python check the module installation location **

  1. Open the command line and enter
python -v
  1. Take OpenCV as an example, cv2 is the name of the OpenCV module, and then enter
import cv2

So far, this article on how python judges the module installation is complete is introduced. For more related python how to judge whether the module is installed, please search for ZaLou.Cn's previous articles or continue to browse the related articles below. Hope you will support ZaLou more in the future. .Cn!

Recommended Posts

How does python judge the module installation is complete
How to view the python module
How does python improve the calculation speed
How to learn the Python time module
Where is the directory after python installation
How to install the downloaded module in python
Python is short-what does the spirit cage say
How to practice after the python file is written
How does python call the key of a dictionary
How does python get input examples from the keyboard
How does Python output integers
How does python update packages
How does python perform matrix operations
How does Python list update value
How to save the python program
How does python call java classes
Initialize after CentOS 7 installation is complete
How does python import dependency packages
How does python enter interactive mode
How does Python generate xml files
How Python implements the timer function
How does python determine prime numbers
Python string to judge the password strength
What is the id function of python
Where is the pip path of python3
How does python call its own function
How does python distinguish return and yield
What is the prospect of python development
What is the function body of python
Python3 module
What is the function of adb in python
The most complete centos installation tutorial in history
How does Python call cmd using OS modules
How to use the round function in python
How to use the zip function in Python
What does the tab key in python mean
How to use the format function in python
Detailed explanation of the usage of Python decimal module
How to enter python through the command line
How about learning python at the age of 27?
How to switch the hosts file using python
Python how to move the code collectively right
The best way to judge the type in Python
How does Python store data to json files