Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How does python view the library?

Shulou Source: shulou.com Published: 2022-05-31 11:12:15 10月02日 Update

This article is a detailed introduction to "how to view python library" for everyone. The content is detailed, the steps are clear, and the details are properly handled. I hope this article "how to view python library" can help you solve your doubts. Let's go deeper and learn new knowledge together with the ideas of Xiaobian.

There are five ways:

1. Use pydoc command to view on command line.

pydoc modules

Use help() in Python editor to view it.

help("modules")

3. Import sys module to view in python editor.

>>> import sys

>>> sys.modules.keys()

4. Use pip to view on the command line.

If you are using ip as your python package manager, you can run the following command directly from the command line to view the installation package information.

pip freeze

#Or

pip list

Note: you can import the pip module in the python editor to view package information.

5. Use the yolk command on the command line to view.

yolk -l #List all installed modules

yolk -a #List active modules

yolk -n #List inactive modules

yolk -U [packagename] #Check if there is a new version of the module by querying pypi

#yolk install command

pip install yolk

Read here, this article "python how to view the library" article has been introduced, want to master the knowledge points of this article also need to practice to understand, if you want to know more related content of the article, welcome to pay attention to the industry information channel.

Tags: Commands modules articles editors information content activation guidance appropriateness ideas instructions new knowledge methods more steps knowledge knowledge points articles details industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Xiaomi Redmi Huawei MySQL