In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
In this article, the editor introduces in detail "the method of installing the third-party library in Pycharm", the content is detailed, the steps are clear, and the details are handled properly. I hope that this article "the method of installing the third-party library in Pycharm" can help you solve your doubts.
When installing libraries, be sure to pay special attention to the dependencies between packages
First, install third-party libraries directly in Pycharm
1. Open Pycharm, click File in the upper left corner, and click Settings. , as shown in the following figure
2. Enter the interface shown below and click the + sign in the upper right corner.
3. To search for the libraries you want to install, click install, as shown in the following figure
Install the library through cmd
1. First download the .whl file corresponding to the computer python version on the website https://www.lfd.uci.edu/~gohlke/pythonlibs/.
2. Then go to the venv- > > Scripts folder in the corresponding Pycharm environment and put the downloaded .whl file into it (note that in which environment you want to install the library and enter the corresponding folder), enter this folder in cmd, and use the pip command to install the appropriate library, as shown in the following figure
3. After the installation is successful, use import to test.
III. Other
When we use pip to install third-party libraries, we are sometimes reminded that the pip version is too low to install, and we need to upgrade pip.
1. Upgrade pip directly in Pycharm
2. Upgrade pip on the command line, as shown in the following figure. Note here that my administrator's name is wwww, so when upgrading pip, it must be under this folder, that is, I must upgrade as an administrator. Just enter the command for pip update.
Add: pycharm failed to install third-party libraries solution
Sometimes the update of the third-party database has been failed, guess is the source of the problem, replaced by the source of Douban still can not be updated, with reference to online search to finally solve the problem, here is a solution.
Method 1: change the source in pycharm.
Built-in is a foreign source, replaced by domestic access is faster and more stable, providing several available sources:
Tsinghua: https://pypi.tuna.tsinghua.edu.cn/simple
Douban: https://pypi.douban.com/simple/
Ali: https://mirrors.aliyun.com/pypi/simple/
I used Ali. Step: File > Setting > + > Manage Repositories > + add a new URL (such as https://mirrors.aliyun.com/pypi/simple/ above) to solve the problem.
Method 2: update the target library directly from the command line
Cmd command: python-m pip install requests-- trusted-host=pypi.py
Thon.org-trusted-host=pypi.org-trusted-host=files.pythonhosted.org
This is more straightforward, you need to know the name of the library you need, of course, the operation is not as good as the first one.
There is also an episode, the low version of pip may also lead to installation failure, first update pip to v20.1 with the command line, and then inexplicably OK when installing other libraries
After reading this, the article "how to install a third-party library in Pycharm" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it yourself. If you want to know more about the article, you are 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.