Introduction of Python library

Three ways to achieve:
pycharm,
file -> settings->project ->project interpreter -> + sign -> search for the corresponding library, but the network speed is slow, the download is slow, and the download is easy to fail

Open the command line
pip --default-timeout=1000 install -U library name (such as jieba)
This download is slow, but the probability of failure to extend the request time is low

After decompressing the downloaded library package from Baidu Netdisk, open the command line,
cd decompression path and
press enter python setup.py install

For the library that has been downloaded but is still unavailable, it means that the interpreter where the library you installed is not the interpreter your current program uses.
The solution:
file -> settings->project ->project interpreter ->
setting icon -> add -> exist environment -> look for the path, find the python.exe in the path where you installed the library, you say you can't find it, then You repeat the installation on the command line again, then copy the generated path, and paste it into the upper search of "exist environment -" path search

Guess you like

Origin blog.csdn.net/qq_41904106/article/details/111148599