pycharm how to use the built-in python library

Just when I pycharm beginner reptiles, obviously there are requests library pycharm gave me an error saying
no requests the library, I clearly pip good. Here to talk about the specific reasons

1. Cause

I created a file named python reptile, python is not configured as an independent open environment leads to the library can not be used.

2. Solution

1. Open pycharm, find the following setting options.
Here Insert Picture Description
2. Click to enter, and then locate the project this option
Here Insert Picture Description

3. For the students do not know their own position and python version
can open a terminal and
enter SYS Import
sys.executable
diagram see below
Here Insert Picture Description4. Click add, you can find the path of python.exe

Here Insert Picture Description
Here Insert Picture Description5. Click the + to install the library files.

Here Insert Picture Description6. You can also configure several domestic mirrored faster download speeds, click Manage Repositories add ok.
Ali cloud http://mirrors.aliyun.com/pypi/simple  
China University of Science and Technology https://pypi.mirrors.ustc.edu.cn/simple  
watercress (douban) http://pypi.douban.com/simple  
Tsinghua University https://pypi.tuna.tsinghua.edu.cn/simple  
China University of Science and technology http://pypi.mirrors.ustc.edu.cn/simple

Here Insert Picture Description
7. By pycharm terminal pip can also be speed up by in-country mirroring command () is the library file name that you want to install

pip install () -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

3. References

Thanks to the author's blog and write articles
[1]: http://www.imooc.com/article/30024
[2]: https://blog.csdn.net/c_chuxin/article/details/82761486

Released five original articles · won praise 0 · Views 404

Guess you like

Origin blog.csdn.net/weixin_43700568/article/details/104114092