Pycharm fails to install numpy

When using Pycharm to download the numpy library, the following errors may occur:

 There are mainly two ideas in this case:

The first method is to check whether the pip version is correct. For the specific operation method, please refer to this blog: The solution to the failure of PyCharm to install the library numpy The thing is like this, bloggers are beginners in python and machine learning, and when they run a code, they are prompted with the following error: (If they can be prompted with this error, it can be seen that they are indeed beginners!) Figure 1: Error report when running code Note: Figure 1 is the second error that occurred after installing numpy. The essence of the error is the same. They are all missing a certain library. Baidu checked the information and learned that there is an installation library in PyCharm: Settings>>Python Interpreter> > Click the plus sign circled in red in Figure 2, and Figure 3 will appear Figure 2: A method to install the library Figure 3: Click the plus sign in Figure 2 and the interface that appears is smooth, only https://blog.csdn.net/ weixin_45765672/article/details/118465356

In the second method, you can refer to this blog when the following problem occurs: python problem solution 1: Pycharm installs third-party libraries and reports non-zero exit code (1 ) When plug-ins such as jieba, six, etc., the following problems occur; reasons: 1. The installed version cannot be found; 2. Reading timeout (because third-party libraries are downloaded through foreign websites, such problems often occur) solutions: 1. Use pip install pandas to report an error, try to use python -m pip install --upgrade pip to upgrade pip, if you still report an error, use the following method; 2. Use this command on the Terminal side (you can also enter it under the cmd command): pip install pandas-i https ://pypi. https://blog.csdn.net/weixin_44940488/article/details/106312374

 The third method is more trouble-free. You can choose to uninstall Pycharm and reinstall it. After installation, you must set System Interference. Before System Interference, you must create a new Python folder, otherwise Pycharm will not know which file to use. to set.

​​​​​​​​System Interference setting steps are as follows:

1.File→Setting;

2. Project: The name of the Python folder you see, as shown in the figure: (My folder name is Pystudy)

 3. Project Interpreter→Add, as shown in the figure:

 4. System Interpreter→Choose your own Python installation path, click ok, as shown in the figure;

 Then you can choose the library you want to download in the interface shown in the figure below according to your needs.

Note: When downloading the library, it must correspond to the operating environment of your own program, otherwise an error will be reported.

As shown in the figure, in the case of Python 3.7, because the relevant libraries have been downloaded, everything may run normally:

In the environment shown in the figure below, the library used in the program has not been downloaded, so it will prompt that there is no library file 

 

 

 

Guess you like

Origin blog.csdn.net/songlinjine/article/details/125432774