Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Python Module installation

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you the "sample analysis of Python module installation", which is easy to understand and well-organized. I hope it can help you solve your doubts. Let the editor lead you to study and study the "sample analysis of Python module installation".

Python module installation

one。 Open a command prompt

Win + R enter cmd and click OK

Or win + S search enter cmd

two。 Enter the installation command pip install module name if there is no problem with the environment variable

If you want to install requests module, enter pip install requests to enter.

If you want to install selenium module, enter pip install selenium to enter.

...

Requirement already satisfied: indicates that this module has been installed before

The following WARNING: is a warning that you can update the pip version and ignore it

There will be one on the first installation, and the installation progress bar shows

Successfully installed selenium-3.141.0 indicates that the installation was successful

Installation failure:

1.pip is not an internal command

Reason: the python environment variable is not set properly

Solution:

My computer > right mouse button Select Properties > Select Advanced system Settings > Select Environment variables > Select path > Select New > paste Environment installation path

two。 It is shown in cmd that it has been installed, but an error is reported in pycharm, indicating that there is no such module.

Reason 1: the python interpreter in pycharm is not set up.

Solution:

Open pycharm > Select File > Select setting > Select item > > Click Gear > Select add > Select the path of python installation to add it

Reason 2: multiple versions of python are installed

Solution:

Type where python in cmd to check the python path to see if multiple versions are installed.

Or type python in cmd to see if the python version is the same as your own pycharm version.

Just uninstall the redundant python environment

3. There are a large number of red errors in the installation module in cmd

There are many reasons for reporting errors, but the specific ones still depend on your error information. Here are a few more conventional ones.

First: when the network link times out, just switch to a domestic mirror source.

Second: lack of vc++ environment, you can install it.

Third: lack of dependent libraries, you need to install dependent libraries

In the end, the installation may fail because of the lower version of the pip module, or it may fail because of the error in the name of your installation module, or the module may not need to be installed in the built-in module, and then you install it, showing that there is no such module.

The above is all the contents of the article "sample Analysis of Python Module installation". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report